aboutsummaryrefslogtreecommitdiffstats
path: root/security/lsm_audit.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/lsm_audit.c')
-rw-r--r--security/lsm_audit.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/security/lsm_audit.c b/security/lsm_audit.c
index 7bd6f138236b..fc41b7cccb53 100644
--- a/security/lsm_audit.c
+++ b/security/lsm_audit.c
@@ -235,10 +235,11 @@ static void dump_common_audit_data(struct audit_buffer *ab,
235 audit_log_d_path(ab, "path=", &a->u.path); 235 audit_log_d_path(ab, "path=", &a->u.path);
236 236
237 inode = a->u.path.dentry->d_inode; 237 inode = a->u.path.dentry->d_inode;
238 if (inode) 238 if (inode) {
239 audit_log_format(ab, " dev=%s ino=%lu", 239 audit_log_format(ab, " dev=");
240 inode->i_sb->s_id, 240 audit_log_untrustedstring(ab, inode->i_sb->s_id);
241 inode->i_ino); 241 audit_log_format(ab, " ino=%lu", inode->i_ino);
242 }
242 break; 243 break;
243 } 244 }
244 case LSM_AUDIT_DATA_DENTRY: { 245 case LSM_AUDIT_DATA_DENTRY: {
@@ -248,10 +249,11 @@ static void dump_common_audit_data(struct audit_buffer *ab,
248 audit_log_untrustedstring(ab, a->u.dentry->d_name.name); 249 audit_log_untrustedstring(ab, a->u.dentry->d_name.name);
249 250
250 inode = a->u.dentry->d_inode; 251 inode = a->u.dentry->d_inode;
251 if (inode) 252 if (inode) {
252 audit_log_format(ab, " dev=%s ino=%lu", 253 audit_log_format(ab, " dev=");
253 inode->i_sb->s_id, 254 audit_log_untrustedstring(ab, inode->i_sb->s_id);
254 inode->i_ino); 255 audit_log_format(ab, " ino=%lu", inode->i_ino);
256 }
255 break; 257 break;
256 } 258 }
257 case LSM_AUDIT_DATA_INODE: { 259 case LSM_AUDIT_DATA_INODE: {
@@ -266,8 +268,9 @@ static void dump_common_audit_data(struct audit_buffer *ab,
266 dentry->d_name.name); 268 dentry->d_name.name);
267 dput(dentry); 269 dput(dentry);
268 } 270 }
269 audit_log_format(ab, " dev=%s ino=%lu", inode->i_sb->s_id, 271 audit_log_format(ab, " dev=");
270 inode->i_ino); 272 audit_log_untrustedstring(ab, inode->i_sb->s_id);
273 audit_log_format(ab, " ino=%lu", inode->i_ino);
271 break; 274 break;
272 } 275 }
273 case LSM_AUDIT_DATA_TASK: 276 case LSM_AUDIT_DATA_TASK: