aboutsummaryrefslogtreecommitdiffstats
path: root/security/apparmor
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2013-10-08 08:37:26 -0400
committerJohn Johansen <john.johansen@canonical.com>2013-10-30 00:33:52 -0400
commit61e3fb8acaea0ca4303ef123bae7edf8435dc2b7 (patch)
tree434c0947a474470b8fc58e95074f40ff9e0613b8 /security/apparmor
parentdd0c6e86f66080869ca0a48c78fb9bfbe4cf156f (diff)
apparmor: remove tsk field from the apparmor_audit_struct
Now that aa_capabile no longer sets the task field it can be removed and the lsm_audit version of the field can be used. Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor')
-rw-r--r--security/apparmor/audit.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/security/apparmor/audit.c b/security/apparmor/audit.c
index 031d2d9dd695..e32c4483fba1 100644
--- a/security/apparmor/audit.c
+++ b/security/apparmor/audit.c
@@ -111,7 +111,7 @@ static const char *const aa_audit_type[] = {
111static void audit_pre(struct audit_buffer *ab, void *ca) 111static void audit_pre(struct audit_buffer *ab, void *ca)
112{ 112{
113 struct common_audit_data *sa = ca; 113 struct common_audit_data *sa = ca;
114 struct task_struct *tsk = sa->aad->tsk ? sa->aad->tsk : current; 114 struct task_struct *tsk = sa->u.tsk ? sa->u.tsk : current;
115 115
116 if (aa_g_audit_header) { 116 if (aa_g_audit_header) {
117 audit_log_format(ab, "apparmor="); 117 audit_log_format(ab, "apparmor=");
@@ -149,12 +149,6 @@ static void audit_pre(struct audit_buffer *ab, void *ca)
149 audit_log_format(ab, " name="); 149 audit_log_format(ab, " name=");
150 audit_log_untrustedstring(ab, sa->aad->name); 150 audit_log_untrustedstring(ab, sa->aad->name);
151 } 151 }
152
153 if (sa->aad->tsk) {
154 audit_log_format(ab, " pid=%d comm=", tsk->pid);
155 audit_log_untrustedstring(ab, tsk->comm);
156 }
157
158} 152}
159 153
160/** 154/**
@@ -212,7 +206,7 @@ int aa_audit(int type, struct aa_profile *profile, gfp_t gfp,
212 206
213 if (sa->aad->type == AUDIT_APPARMOR_KILL) 207 if (sa->aad->type == AUDIT_APPARMOR_KILL)
214 (void)send_sig_info(SIGKILL, NULL, 208 (void)send_sig_info(SIGKILL, NULL,
215 sa->aad->tsk ? sa->aad->tsk : current); 209 sa->u.tsk ? sa->u.tsk : current);
216 210
217 if (sa->aad->type == AUDIT_APPARMOR_ALLOWED) 211 if (sa->aad->type == AUDIT_APPARMOR_ALLOWED)
218 return complain_error(sa->aad->error); 212 return complain_error(sa->aad->error);