kernel: require admin permissions for swconfig set operations

Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Felix Fietkau 2016-06-12 12:03:11 +02:00
parent fecd715ef8
commit 37cfc23cb7

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