[PATCH] SELinux: fix bug in Netlink message type detection
authorJames Morris <jmorris@redhat.com>
Sat, 16 Apr 2005 22:24:03 +0000 (15:24 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 16 Apr 2005 22:24:03 +0000 (15:24 -0700)
This patch fixes a bug in the SELinux Netlink message type detection code,
where the wrong constant was being used in a case statement.  The incorrect
value is not valid for this class of object so it would not have been
reached, and fallen through to a default handler for all Netlink messages.

Signed-off-by: James Morris <jmorris@redhat.com>
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
security/selinux/nlmsgtab.c

index fa7fa030e6ebaa5609bb5ce1baff3181350da0b3..f79408252730567a3e82e9b4a4eca445ac46a7c1 100644 (file)
@@ -126,7 +126,7 @@ int selinux_nlmsg_lookup(u16 sclass, u16 nlmsg_type, u32 *perm)
                break;
 
        case SECCLASS_NETLINK_FIREWALL_SOCKET:
-       case NETLINK_IP6_FW:
+       case SECCLASS_NETLINK_IP6FW_SOCKET:
                err = nlmsg_perm(nlmsg_type, perm, nlmsg_firewall_perms,
                                 sizeof(nlmsg_firewall_perms));
                break;