]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - kernel/auditsc.c
mm: /proc/pid/smaps: factor out mem stats gathering
[linux.git] / kernel / auditsc.c
index 80d672a1108883be0553212757c13912cabe5bec..b2d1f043f17fb93fd30b28065e89d1f7371828a6 100644 (file)
@@ -494,20 +494,20 @@ static int audit_filter_rules(struct task_struct *tsk,
                        result = audit_gid_comparator(cred->gid, f->op, f->gid);
                        if (f->op == Audit_equal) {
                                if (!result)
-                                       result = in_group_p(f->gid);
+                                       result = groups_search(cred->group_info, f->gid);
                        } else if (f->op == Audit_not_equal) {
                                if (result)
-                                       result = !in_group_p(f->gid);
+                                       result = !groups_search(cred->group_info, f->gid);
                        }
                        break;
                case AUDIT_EGID:
                        result = audit_gid_comparator(cred->egid, f->op, f->gid);
                        if (f->op == Audit_equal) {
                                if (!result)
-                                       result = in_egroup_p(f->gid);
+                                       result = groups_search(cred->group_info, f->gid);
                        } else if (f->op == Audit_not_equal) {
                                if (result)
-                                       result = !in_egroup_p(f->gid);
+                                       result = !groups_search(cred->group_info, f->gid);
                        }
                        break;
                case AUDIT_SGID:
@@ -1544,10 +1544,10 @@ void __audit_syscall_entry(int major, unsigned long a1, unsigned long a2,
        context->argv[2]    = a3;
        context->argv[3]    = a4;
        context->serial     = 0;
-       context->ctime = current_kernel_time64();
        context->in_syscall = 1;
        context->current_state  = state;
        context->ppid       = 0;
+       ktime_get_coarse_real_ts64(&context->ctime);
 }
 
 /**
@@ -2466,7 +2466,7 @@ void audit_core_dumps(long signr)
        if (signr == SIGQUIT)   /* don't care for those */
                return;
 
-       ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_ANOM_ABEND);
+       ab = audit_log_start(audit_context(), GFP_KERNEL, AUDIT_ANOM_ABEND);
        if (unlikely(!ab))
                return;
        audit_log_task(ab);
@@ -2490,7 +2490,7 @@ void audit_seccomp(unsigned long syscall, long signr, int code)
 {
        struct audit_buffer *ab;
 
-       ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_SECCOMP);
+       ab = audit_log_start(audit_context(), GFP_KERNEL, AUDIT_SECCOMP);
        if (unlikely(!ab))
                return;
        audit_log_task(ab);