kernel: require admin permissions for swconfig set operations

Signed-off-by: Felix Fietkau <nbd@nbd.name>
lede-17.01
Felix Fietkau 2016-06-12 12:03:11 +02:00
parent fecd715ef8
commit 37cfc23cb7
1 changed files with 3 additions and 0 deletions

View File

@ -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,
},