aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/hooks.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-06-06 19:34:00 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-06-06 19:34:00 -0400
commit8b5c6a3a49d9ebc7dc288870b9c56c4f946035d8 (patch)
treec70c88f0ee12cd59878c2c4da29d4984954ba7d6 /security/selinux/hooks.c
parent8b70543e9af036984a52800811416b74978ae4de (diff)
parent5b71388663c0920848c0ee7de946970a2692b76d (diff)
Merge tag 'audit-pr-20180605' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit
Pull audit updates from Paul Moore: "Another reasonable chunk of audit changes for v4.18, thirteen patches in total. The thirteen patches can mostly be broken down into one of four categories: general bug fixes, accessor functions for audit state stored in the task_struct, negative filter matches on executable names, and extending the (relatively) new seccomp logging knobs to the audit subsystem. The main driver for the accessor functions from Richard are the changes we're working on to associate audit events with containers, but I think they have some standalone value too so I figured it would be good to get them in now. The seccomp/audit patches from Tyler apply the seccomp logging improvements from a few releases ago to audit's seccomp logging; starting with this patchset the changes in /proc/sys/kernel/seccomp/actions_logged should apply to both the standard kernel logging and audit. As usual, everything passes the audit-testsuite and it happens to merge cleanly with your tree" [ Heh, except it had trivial merge conflicts with the SELinux tree that also came in from Paul - Linus ] * tag 'audit-pr-20180605' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: audit: Fix wrong task in comparison of session ID audit: use existing session info function audit: normalize loginuid read access audit: use new audit_context access funciton for seccomp_actions_logged audit: use inline function to set audit context audit: use inline function to get audit context audit: convert sessionid unset to a macro seccomp: Don't special case audited processes when logging seccomp: Audit attempts to modify the actions_logged sysctl seccomp: Configurable separator for the actions_logged string seccomp: Separate read and write code for actions_logged sysctl audit: allow not equal op for audit by executable audit: add syscall information to FEATURE_CHANGE records
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r--security/selinux/hooks.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 7df0f2ee1e88..25905d09500e 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -3305,7 +3305,8 @@ static int selinux_inode_setxattr(struct dentry *dentry, const char *name,
3305 } else { 3305 } else {
3306 audit_size = 0; 3306 audit_size = 0;
3307 } 3307 }
3308 ab = audit_log_start(current->audit_context, GFP_ATOMIC, AUDIT_SELINUX_ERR); 3308 ab = audit_log_start(audit_context(),
3309 GFP_ATOMIC, AUDIT_SELINUX_ERR);
3309 audit_log_format(ab, "op=setxattr invalid_context="); 3310 audit_log_format(ab, "op=setxattr invalid_context=");
3310 audit_log_n_untrustedstring(ab, value, audit_size); 3311 audit_log_n_untrustedstring(ab, value, audit_size);
3311 audit_log_end(ab); 3312 audit_log_end(ab);
@@ -6460,7 +6461,9 @@ static int selinux_setprocattr(const char *name, void *value, size_t size)
6460 audit_size = size - 1; 6461 audit_size = size - 1;
6461 else 6462 else
6462 audit_size = size; 6463 audit_size = size;
6463 ab = audit_log_start(current->audit_context, GFP_ATOMIC, AUDIT_SELINUX_ERR); 6464 ab = audit_log_start(audit_context(),
6465 GFP_ATOMIC,
6466 AUDIT_SELINUX_ERR);
6464 audit_log_format(ab, "op=fscreate invalid_context="); 6467 audit_log_format(ab, "op=fscreate invalid_context=");
6465 audit_log_n_untrustedstring(ab, value, audit_size); 6468 audit_log_n_untrustedstring(ab, value, audit_size);
6466 audit_log_end(ab); 6469 audit_log_end(ab);