From 37cfc23cb7bcfd90da137c0495303b19ddcf4b42 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 12 Jun 2016 12:03:11 +0200 Subject: [PATCH] kernel: require admin permissions for swconfig set operations Signed-off-by: Felix Fietkau --- target/linux/generic/files/drivers/net/phy/swconfig.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/linux/generic/files/drivers/net/phy/swconfig.c b/target/linux/generic/files/drivers/net/phy/swconfig.c index 699abd33dd89..c70ca74cadde 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, }, -- 2.30.2