diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-05-25 10:19:47 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2006-06-20 05:25:21 -0400 |
commit | e1396065e0489f98b35021b97907ab4edbfb24e1 (patch) | |
tree | a276ea0a2ece9132d435adf1a1f82d0ada1ae938 /kernel/auditsc.c | |
parent | 473ae30bc7b1dda5c5791c773f95e9424ddfead9 (diff) |
[PATCH] collect sid of those who send signals to auditd
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel/auditsc.c')
-rw-r--r-- | kernel/auditsc.c | 23 |
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 | */ |
1379 | void audit_signal_info(int sig, struct task_struct *t) | 1379 | void __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 | } |