diff options
Diffstat (limited to 'kernel/auditsc.c')
-rw-r--r-- | kernel/auditsc.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index 37b3ac94bc47..f1bf66510cd3 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c | |||
@@ -1056,3 +1056,22 @@ int audit_ipc_perms(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode) | |||
1056 | context->aux = (void *)ax; | 1056 | context->aux = (void *)ax; |
1057 | return 0; | 1057 | return 0; |
1058 | } | 1058 | } |
1059 | |||
1060 | void audit_signal_info(int sig, struct task_struct *t) | ||
1061 | { | ||
1062 | extern pid_t audit_sig_pid; | ||
1063 | extern uid_t audit_sig_uid; | ||
1064 | extern int audit_pid; | ||
1065 | |||
1066 | if (unlikely(audit_pid && t->pid == audit_pid)) { | ||
1067 | if (sig == SIGTERM || sig == SIGHUP) { | ||
1068 | struct audit_context *ctx = current->audit_context; | ||
1069 | audit_sig_pid = current->pid; | ||
1070 | if (ctx) | ||
1071 | audit_sig_uid = ctx->loginuid; | ||
1072 | else | ||
1073 | audit_sig_uid = current->uid; | ||
1074 | } | ||
1075 | } | ||
1076 | } | ||
1077 | |||