]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - kernel/audit.c
Merge branch 'for-linus' of git://selinuxproject.org/~jmorris/linux-security
[mirror_ubuntu-bionic-kernel.git] / kernel / audit.c
index 2c1d6ab7106ee9921bc8456d0e9b5e11637a11f3..57e3f5107937f89951be2482040e294bee659bf5 100644 (file)
@@ -601,13 +601,13 @@ static int audit_netlink_ok(struct sk_buff *skb, u16 msg_type)
        case AUDIT_TTY_SET:
        case AUDIT_TRIM:
        case AUDIT_MAKE_EQUIV:
-               if (security_netlink_recv(skb, CAP_AUDIT_CONTROL))
+               if (!capable(CAP_AUDIT_CONTROL))
                        err = -EPERM;
                break;
        case AUDIT_USER:
        case AUDIT_FIRST_USER_MSG ... AUDIT_LAST_USER_MSG:
        case AUDIT_FIRST_USER_MSG2 ... AUDIT_LAST_USER_MSG2:
-               if (security_netlink_recv(skb, CAP_AUDIT_WRITE))
+               if (!capable(CAP_AUDIT_WRITE))
                        err = -EPERM;
                break;
        default:  /* bad msg */