]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
SELinux: define permissions for DCB netlink messages
authorEric Paris <eparis@redhat.com>
Thu, 16 Dec 2010 16:46:51 +0000 (11:46 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 21 Mar 2011 19:44:59 +0000 (12:44 -0700)
commit 350e4f31e0eaf56dfc3b328d24a11bdf42a41fb8 upstream.

Commit 2f90b865 added two new netlink message types to the netlink route
socket.  SELinux has hooks to define if netlink messages are allowed to
be sent or received, but it did not know about these two new message
types.  By default we allow such actions so noone likely noticed.  This
patch adds the proper definitions and thus proper permissions
enforcement.

Signed-off-by: Eric Paris <eparis@redhat.com>
Cc: James Morris <jmorris@namei.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
security/selinux/nlmsgtab.c

index dd7cc6de77f9e3a47118b6e8dffca3538b36adb3..24b958c874175192d27949afaec50939023f0dd7 100644 (file)
@@ -66,6 +66,8 @@ static struct nlmsg_perm nlmsg_route_perms[] =
        { RTM_NEWADDRLABEL,     NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
        { RTM_DELADDRLABEL,     NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
        { RTM_GETADDRLABEL,     NETLINK_ROUTE_SOCKET__NLMSG_READ  },
+       { RTM_GETDCB,           NETLINK_ROUTE_SOCKET__NLMSG_READ  },
+       { RTM_SETDCB,           NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
 };
 
 static struct nlmsg_perm nlmsg_firewall_perms[] =