diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-02-01 16:37:03 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-02-01 16:37:03 -0500 |
| commit | dd5f5fed6c9458a7aa81eeef3732cc3a9891cfdf (patch) | |
| tree | 06b81942dc218763889efe65faf08aeb23e71f03 /security/selinux/selinuxfs.c | |
| parent | 3e01dfce1387f8bec41018f0d7b42fd88ad4163f (diff) | |
| parent | 7759db82774802885f96c250b36c3dfe317e62ff (diff) | |
Merge branch 'audit.b46' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current
* 'audit.b46' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current:
[AUDIT] Add uid, gid fields to ANOM_PROMISCUOUS message
[AUDIT] ratelimit printk messages audit
[patch 2/2] audit: complement va_copy with va_end()
[patch 1/2] kernel/audit.c: warning fix
[AUDIT] create context if auditing was ever enabled
[AUDIT] clean up audit_receive_msg()
[AUDIT] make audit=0 really stop audit messages
[AUDIT] break large execve argument logging into smaller messages
[AUDIT] include audit type in audit message when using printk
[AUDIT] do not panic on exclude messages in audit_log_pid_context()
[AUDIT] Add End of Event record
[AUDIT] add session id to audit messages
[AUDIT] collect uid, loginuid, and comm in OBJ_PID records
[AUDIT] return EINTR not ERESTART*
[PATCH] get rid of loginuid races
[PATCH] switch audit_get_loginuid() to task_struct *
Diffstat (limited to 'security/selinux/selinuxfs.c')
| -rw-r--r-- | security/selinux/selinuxfs.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c index a85740530afc..0341567665b3 100644 --- a/security/selinux/selinuxfs.c +++ b/security/selinux/selinuxfs.c | |||
| @@ -172,9 +172,10 @@ static ssize_t sel_write_enforce(struct file * file, const char __user * buf, | |||
| 172 | if (length) | 172 | if (length) |
| 173 | goto out; | 173 | goto out; |
| 174 | audit_log(current->audit_context, GFP_KERNEL, AUDIT_MAC_STATUS, | 174 | audit_log(current->audit_context, GFP_KERNEL, AUDIT_MAC_STATUS, |
| 175 | "enforcing=%d old_enforcing=%d auid=%u", new_value, | 175 | "enforcing=%d old_enforcing=%d auid=%u ses=%u", |
| 176 | selinux_enforcing, | 176 | new_value, selinux_enforcing, |
| 177 | audit_get_loginuid(current->audit_context)); | 177 | audit_get_loginuid(current), |
| 178 | audit_get_sessionid(current)); | ||
| 178 | selinux_enforcing = new_value; | 179 | selinux_enforcing = new_value; |
| 179 | if (selinux_enforcing) | 180 | if (selinux_enforcing) |
| 180 | avc_ss_reset(0); | 181 | avc_ss_reset(0); |
| @@ -243,8 +244,9 @@ static ssize_t sel_write_disable(struct file * file, const char __user * buf, | |||
| 243 | if (length < 0) | 244 | if (length < 0) |
| 244 | goto out; | 245 | goto out; |
| 245 | audit_log(current->audit_context, GFP_KERNEL, AUDIT_MAC_STATUS, | 246 | audit_log(current->audit_context, GFP_KERNEL, AUDIT_MAC_STATUS, |
| 246 | "selinux=0 auid=%u", | 247 | "selinux=0 auid=%u ses=%u", |
| 247 | audit_get_loginuid(current->audit_context)); | 248 | audit_get_loginuid(current), |
| 249 | audit_get_sessionid(current)); | ||
| 248 | } | 250 | } |
| 249 | 251 | ||
| 250 | length = count; | 252 | length = count; |
| @@ -356,8 +358,9 @@ out1: | |||
| 356 | (security_get_allow_unknown() ? "allow" : "deny"))); | 358 | (security_get_allow_unknown() ? "allow" : "deny"))); |
| 357 | 359 | ||
| 358 | audit_log(current->audit_context, GFP_KERNEL, AUDIT_MAC_POLICY_LOAD, | 360 | audit_log(current->audit_context, GFP_KERNEL, AUDIT_MAC_POLICY_LOAD, |
| 359 | "policy loaded auid=%u", | 361 | "policy loaded auid=%u ses=%u", |
| 360 | audit_get_loginuid(current->audit_context)); | 362 | audit_get_loginuid(current), |
| 363 | audit_get_sessionid(current)); | ||
| 361 | out: | 364 | out: |
| 362 | mutex_unlock(&sel_mutex); | 365 | mutex_unlock(&sel_mutex); |
| 363 | vfree(data); | 366 | vfree(data); |
