diff options
Diffstat (limited to 'security/apparmor/audit.c')
-rw-r--r-- | security/apparmor/audit.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/security/apparmor/audit.c b/security/apparmor/audit.c index 031d2d9dd695..89c78658031f 100644 --- a/security/apparmor/audit.c +++ b/security/apparmor/audit.c | |||
@@ -111,7 +111,6 @@ static const char *const aa_audit_type[] = { | |||
111 | static void audit_pre(struct audit_buffer *ab, void *ca) | 111 | static 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; | ||
115 | 114 | ||
116 | if (aa_g_audit_header) { | 115 | if (aa_g_audit_header) { |
117 | audit_log_format(ab, "apparmor="); | 116 | audit_log_format(ab, "apparmor="); |
@@ -132,11 +131,6 @@ static void audit_pre(struct audit_buffer *ab, void *ca) | |||
132 | 131 | ||
133 | if (sa->aad->profile) { | 132 | if (sa->aad->profile) { |
134 | struct aa_profile *profile = sa->aad->profile; | 133 | struct aa_profile *profile = sa->aad->profile; |
135 | pid_t pid; | ||
136 | rcu_read_lock(); | ||
137 | pid = rcu_dereference(tsk->real_parent)->pid; | ||
138 | rcu_read_unlock(); | ||
139 | audit_log_format(ab, " parent=%d", pid); | ||
140 | if (profile->ns != root_ns) { | 134 | if (profile->ns != root_ns) { |
141 | audit_log_format(ab, " namespace="); | 135 | audit_log_format(ab, " namespace="); |
142 | audit_log_untrustedstring(ab, profile->ns->base.hname); | 136 | audit_log_untrustedstring(ab, profile->ns->base.hname); |
@@ -149,12 +143,6 @@ static void audit_pre(struct audit_buffer *ab, void *ca) | |||
149 | audit_log_format(ab, " name="); | 143 | audit_log_format(ab, " name="); |
150 | audit_log_untrustedstring(ab, sa->aad->name); | 144 | audit_log_untrustedstring(ab, sa->aad->name); |
151 | } | 145 | } |
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 | } | 146 | } |
159 | 147 | ||
160 | /** | 148 | /** |
@@ -212,7 +200,7 @@ int aa_audit(int type, struct aa_profile *profile, gfp_t gfp, | |||
212 | 200 | ||
213 | if (sa->aad->type == AUDIT_APPARMOR_KILL) | 201 | if (sa->aad->type == AUDIT_APPARMOR_KILL) |
214 | (void)send_sig_info(SIGKILL, NULL, | 202 | (void)send_sig_info(SIGKILL, NULL, |
215 | sa->aad->tsk ? sa->aad->tsk : current); | 203 | sa->u.tsk ? sa->u.tsk : current); |
216 | 204 | ||
217 | if (sa->aad->type == AUDIT_APPARMOR_ALLOWED) | 205 | if (sa->aad->type == AUDIT_APPARMOR_ALLOWED) |
218 | return complain_error(sa->aad->error); | 206 | return complain_error(sa->aad->error); |