Skip to contentSkip to conversation

net/smc: allow unprivileged users to read pnet table

PATCH In review Hans Wippel 2 participants 2 messages Jan 21, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 net/smc/smc_pnet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/smc/smc_pnet.c +1 -1
index 82dedf052d86..2a5ed47c3e08 100644
@@ -611,7 +611,7 @@ static const struct genl_ops smc_pnet_ops[] = {
 	{
 		.cmd = SMC_PNETID_GET,
 		.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
-		.flags = GENL_ADMIN_PERM,
+		/* can be retrieved by unprivileged users */
 		.doit = smc_pnet_get,
 		.dumpit = smc_pnet_dump,
 		.start = smc_pnet_dump_start
Signature · 1 line
2.25.0
maintainer
#1 lore raw

From: Hans Wippel <[email protected]>
Date: Tue, 21 Jan 2020 01:04:46 +0100

Quoted 9 lines

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.

Seems reasonable, applied, thanks.