aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/auditsc.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/auditsc.c')
-rw-r--r--kernel/auditsc.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index 114f921979ec..4ca913daa7da 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -1376,19 +1376,20 @@ int audit_avc_path(struct dentry *dentry, struct vfsmount *mnt)
1376 * If the audit subsystem is being terminated, record the task (pid) 1376 * If the audit subsystem is being terminated, record the task (pid)
1377 * and uid that is doing that. 1377 * and uid that is doing that.
1378 */ 1378 */
1379void audit_signal_info(int sig, struct task_struct *t) 1379void __audit_signal_info(int sig, struct task_struct *t)
1380{ 1380{
1381 extern pid_t audit_sig_pid; 1381 extern pid_t audit_sig_pid;
1382 extern uid_t audit_sig_uid; 1382 extern uid_t audit_sig_uid;
1383 1383 extern u32 audit_sig_sid;
1384 if (unlikely(audit_pid && t->tgid == audit_pid)) { 1384
1385 if (sig == SIGTERM || sig == SIGHUP) { 1385 if (sig == SIGTERM || sig == SIGHUP || sig == SIGUSR1) {
1386 struct audit_context *ctx = current->audit_context; 1386 struct task_struct *tsk = current;
1387 audit_sig_pid = current->pid; 1387 struct audit_context *ctx = tsk->audit_context;
1388 if (ctx) 1388 audit_sig_pid = tsk->pid;
1389 audit_sig_uid = ctx->loginuid; 1389 if (ctx)
1390 else 1390 audit_sig_uid = ctx->loginuid;
1391 audit_sig_uid = current->uid; 1391 else
1392 } 1392 audit_sig_uid = tsk->uid;
1393 selinux_get_task_sid(tsk, &audit_sig_sid);
1393 } 1394 }
1394} 1395}