From: Felix Fietkau Date: Sun, 12 Jun 2016 10:03:11 +0000 (+0200) Subject: kernel: require admin permissions for swconfig set operations X-Git-Tag: v17.01.0-rc1~2439 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=37cfc23cb7bcfd90da137c0495303b19ddcf4b42;p=openwrt%2Fstaging%2Fxback.git kernel: require admin permissions for swconfig set operations Signed-off-by: Felix Fietkau --- diff --git a/target/linux/generic/files/drivers/net/phy/swconfig.c b/target/linux/generic/files/drivers/net/phy/swconfig.c index 699abd33dd..c70ca74cad 100644 --- a/target/linux/generic/files/drivers/net/phy/swconfig.c +++ b/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, },