Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net/smc: allow unprivileged users to read pnet table

The current flags of the SMC_PNET_GET command only allow privileged
users to retrieve entries from the pnet table via netlink. The content
of the pnet table may be useful for all users though, e.g., for
debugging smc connection problems.

This patch removes the GENL_ADMIN_PERM flag so that unprivileged users
can read the pnet table.

Signed-off-by: Hans Wippel <ndev@hwipl.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Hans Wippel and committed by
David S. Miller
29237d22 3ccc897b

+1 -1
+1 -1
net/smc/smc_pnet.c
··· 611 611 { 612 612 .cmd = SMC_PNETID_GET, 613 613 .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, 614 - .flags = GENL_ADMIN_PERM, 614 + /* can be retrieved by unprivileged users */ 615 615 .doit = smc_pnet_get, 616 616 .dumpit = smc_pnet_dump, 617 617 .start = smc_pnet_dump_start