selinux: Print 'sclass' as string when unrecognized netlink message occurs
[pandora-kernel.git] / security / selinux / hooks.c
index 06c9dd9..99c4a00 100644 (file)
@@ -4713,8 +4713,9 @@ static int selinux_nlmsg_perm(struct sock *sk, struct sk_buff *skb)
                if (err == -EINVAL) {
                        printk(KERN_WARNING
                               "SELinux: unrecognized netlink message:"
-                              " protocol=%hu nlmsg_type=%hu sclass=%hu\n",
-                              sk->sk_protocol, nlh->nlmsg_type, sksec->sclass);
+                              " protocol=%hu nlmsg_type=%hu sclass=%s\n",
+                              sk->sk_protocol, nlh->nlmsg_type,
+                              secclass_map[sksec->sclass - 1].name);
                        if (!selinux_enforcing || security_get_allow_unknown())
                                err = 0;
                }