Merge tag 'selinux-pr-20180629' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / security / selinux / selinuxfs.c
index 19e35dd695d7a4efda74b270a00ceb1e074ab7cc..79d3709b06717a1f6452fe85b9922244b9f70381 100644 (file)
@@ -167,7 +167,7 @@ static ssize_t sel_write_enforce(struct file *file, const char __user *buf,
                                      NULL);
                if (length)
                        goto out;
-               audit_log(current->audit_context, GFP_KERNEL, AUDIT_MAC_STATUS,
+               audit_log(audit_context(), GFP_KERNEL, AUDIT_MAC_STATUS,
                        "enforcing=%d old_enforcing=%d auid=%u ses=%u"
                        " enabled=%d old-enabled=%d lsm=selinux res=1",
                        new_value, old_value,
@@ -303,7 +303,7 @@ static ssize_t sel_write_disable(struct file *file, const char __user *buf,
                length = selinux_disable(fsi->state);
                if (length)
                        goto out;
-               audit_log(current->audit_context, GFP_KERNEL, AUDIT_MAC_STATUS,
+               audit_log(audit_context(), GFP_KERNEL, AUDIT_MAC_STATUS,
                        "enforcing=%d old_enforcing=%d auid=%u ses=%u"
                        " enabled=%d old-enabled=%d lsm=selinux res=1",
                        enforcing, enforcing,
@@ -575,7 +575,7 @@ static ssize_t sel_write_load(struct file *file, const char __user *buf,
        length = count;
 
 out1:
-       audit_log(current->audit_context, GFP_KERNEL, AUDIT_MAC_POLICY_LOAD,
+       audit_log(audit_context(), GFP_KERNEL, AUDIT_MAC_POLICY_LOAD,
                "auid=%u ses=%u lsm=selinux res=1",
                from_kuid(&init_user_ns, audit_get_loginuid(current)),
                audit_get_sessionid(current));