SELinux: Only return netlink error when we know the return is fatal
authorEric Paris <eparis@redhat.com>
Tue, 23 Nov 2010 06:28:02 +0000 (06:28 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Nov 2010 18:50:17 +0000 (10:50 -0800)
commit04f6d70f6e64900a5d70a5fc199dd9d5fa787738
tree68d369f422f98842031ae4ada17e391140165b54
parenteb06acdc85585f28864261f28659157848762ee4
SELinux: Only return netlink error when we know the return is fatal

Some of the SELinux netlink code returns a fatal error when the error might
actually be transient.  This patch just silently drops packets on
potentially transient errors but continues to return a permanant error
indicator when the denial was because of policy.

Based-on-comments-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: Eric Paris <eparis@redhat.com>
Reviewed-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
security/selinux/hooks.c