mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
Merge tag 'audit-pr-20190702' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit
Pull audit updates from Paul Moore: "This pull request is a bit early, but with some vacation time coming up I wanted to send this out now just in case the remote Internet Gods decide not to smile on me once the merge window opens. The patchset for v5.3 is pretty minor this time, the highlights include: - When the audit daemon is sent a signal, ensure we deliver information about the sender even when syscall auditing is not enabled/supported. - Add the ability to filter audit records based on network address family. - Tighten the audit field filtering restrictions on string based fields. - Cleanup the audit field filtering verification code. - Remove a few BUG() calls from the audit code" * tag 'audit-pr-20190702' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: audit: remove the BUG() calls in the audit rule comparison functions audit: enforce op for string fields audit: add saddr_fam filter field audit: re-structure audit field valid checks audit: deliver signal_info regarless of syscall
This commit is contained in:
@@ -2260,6 +2260,33 @@ out:
|
||||
return rc;
|
||||
}
|
||||
|
||||
/**
|
||||
* audit_signal_info - record signal info for shutting down audit subsystem
|
||||
* @sig: signal value
|
||||
* @t: task being signaled
|
||||
*
|
||||
* If the audit subsystem is being terminated, record the task (pid)
|
||||
* and uid that is doing that.
|
||||
*/
|
||||
int audit_signal_info(int sig, struct task_struct *t)
|
||||
{
|
||||
kuid_t uid = current_uid(), auid;
|
||||
|
||||
if (auditd_test_task(t) &&
|
||||
(sig == SIGTERM || sig == SIGHUP ||
|
||||
sig == SIGUSR1 || sig == SIGUSR2)) {
|
||||
audit_sig_pid = task_tgid_nr(current);
|
||||
auid = audit_get_loginuid(current);
|
||||
if (uid_valid(auid))
|
||||
audit_sig_uid = auid;
|
||||
else
|
||||
audit_sig_uid = uid;
|
||||
security_task_getsecid(current, &audit_sig_sid);
|
||||
}
|
||||
|
||||
return audit_signal_info_syscall(t);
|
||||
}
|
||||
|
||||
/**
|
||||
* audit_log_end - end one audit record
|
||||
* @ab: the audit_buffer
|
||||
|
Reference in New Issue
Block a user