summaryrefslogtreecommitdiff
path: root/target/linux/generic/files/drivers
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2016-06-12 12:03:11 +0200
committerFelix Fietkau <nbd@nbd.name>2016-06-12 12:03:20 +0200
commit37cfc23cb7bcfd90da137c0495303b19ddcf4b42 (patch)
tree8cad704709d3858ce377db940306d55354fe03c3 /target/linux/generic/files/drivers
parentfecd715ef820d36e262c04ffba5d0d8968ce1ddb (diff)
downloadmtk-20170518-37cfc23cb7bcfd90da137c0495303b19ddcf4b42.zip
mtk-20170518-37cfc23cb7bcfd90da137c0495303b19ddcf4b42.tar.gz
mtk-20170518-37cfc23cb7bcfd90da137c0495303b19ddcf4b42.tar.bz2
kernel: require admin permissions for swconfig set operations
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'target/linux/generic/files/drivers')
-rw-r--r--target/linux/generic/files/drivers/net/phy/swconfig.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/swconfig.c b/target/linux/generic/files/drivers/net/phy/swconfig.c
index 699abd3..c70ca74 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,
},