Sfoglia il codice sorgente

kernel: require admin permissions for swconfig set operations

Signed-off-by: Felix Fietkau <[email protected]>
Felix Fietkau 9 anni fa
parent
commit
37cfc23cb7
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      target/linux/generic/files/drivers/net/phy/swconfig.c

+ 3 - 0
target/linux/generic/files/drivers/net/phy/swconfig.c

@@ -1025,16 +1025,19 @@ static struct genl_ops swconfig_ops[] = {
 	},
 	{
 		.cmd = SWITCH_CMD_SET_GLOBAL,
+		.flags = GENL_ADMIN_PERM,
 		.doit = swconfig_set_attr,
 		.policy = switch_policy,
 	},
 	{
 		.cmd = SWITCH_CMD_SET_VLAN,
+		.flags = GENL_ADMIN_PERM,
 		.doit = swconfig_set_attr,
 		.policy = switch_policy,
 	},
 	{
 		.cmd = SWITCH_CMD_SET_PORT,
+		.flags = GENL_ADMIN_PERM,
 		.doit = swconfig_set_attr,
 		.policy = switch_policy,
 	},