X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;ds=sidebyside;f=security%2Fselinux%2Fnlmsgtab.c;h=4ed7bab89c5938675fd21442550a0791826077d8;hb=5af75d8d58d0f9f7b7c0515b35786b22892d5f12;hp=eddc7b420109aac9c129dedfad67f680b6203e99;hpb=d9ff963801e4f7648c55a27413a1b1de59480a30;p=cascardo%2Flinux.git diff --git a/security/selinux/nlmsgtab.c b/security/selinux/nlmsgtab.c index eddc7b420109..4ed7bab89c59 100644 --- a/security/selinux/nlmsgtab.c +++ b/security/selinux/nlmsgtab.c @@ -23,8 +23,7 @@ #include "flask.h" #include "av_permissions.h" -struct nlmsg_perm -{ +struct nlmsg_perm { u16 nlmsg_type; u32 perm; }; @@ -64,6 +63,9 @@ static struct nlmsg_perm nlmsg_route_perms[] = { RTM_GETANYCAST, NETLINK_ROUTE_SOCKET__NLMSG_READ }, { RTM_GETNEIGHTBL, NETLINK_ROUTE_SOCKET__NLMSG_READ }, { RTM_SETNEIGHTBL, NETLINK_ROUTE_SOCKET__NLMSG_WRITE }, + { RTM_NEWADDRLABEL, NETLINK_ROUTE_SOCKET__NLMSG_WRITE }, + { RTM_DELADDRLABEL, NETLINK_ROUTE_SOCKET__NLMSG_WRITE }, + { RTM_GETADDRLABEL, NETLINK_ROUTE_SOCKET__NLMSG_READ }, }; static struct nlmsg_perm nlmsg_firewall_perms[] = @@ -159,7 +161,7 @@ int selinux_nlmsg_lookup(u16 sclass, u16 nlmsg_type, u32 *perm) if ((nlmsg_type >= AUDIT_FIRST_USER_MSG && nlmsg_type <= AUDIT_LAST_USER_MSG) || (nlmsg_type >= AUDIT_FIRST_USER_MSG2 && - nlmsg_type <= AUDIT_LAST_USER_MSG2)) { + nlmsg_type <= AUDIT_LAST_USER_MSG2)) { *perm = NETLINK_AUDIT_SOCKET__NLMSG_RELAY; } else { err = nlmsg_perm(nlmsg_type, perm, nlmsg_audit_perms,