hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/security/lsm_audit.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * common LSM auditing functions
34 *
....@@ -5,10 +6,6 @@
56 * Stephen Smalley, <sds@tycho.nsa.gov>
67 * James Morris <jmorris@redhat.com>
78 * Author : Etienne Basset, <etienne.basset@ensta.org>
8
- *
9
- * This program is free software; you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License version 2,
11
- * as published by the Free Software Foundation.
129 */
1310
1411 #include <linux/types.h>
....@@ -243,6 +240,7 @@
243240 audit_log_untrustedstring(ab, inode->i_sb->s_id);
244241 audit_log_format(ab, " ino=%lu", inode->i_ino);
245242 }
243
+ audit_getcwd();
246244 break;
247245 }
248246 case LSM_AUDIT_DATA_FILE: {
....@@ -256,6 +254,7 @@
256254 audit_log_untrustedstring(ab, inode->i_sb->s_id);
257255 audit_log_format(ab, " ino=%lu", inode->i_ino);
258256 }
257
+ audit_getcwd();
259258 break;
260259 }
261260 case LSM_AUDIT_DATA_IOCTL_OP: {
....@@ -271,6 +270,7 @@
271270 }
272271
273272 audit_log_format(ab, " ioctlcmd=0x%hx", a->u.op->cmd);
273
+ audit_getcwd();
274274 break;
275275 }
276276 case LSM_AUDIT_DATA_DENTRY: {
....@@ -287,6 +287,7 @@
287287 audit_log_untrustedstring(ab, inode->i_sb->s_id);
288288 audit_log_format(ab, " ino=%lu", inode->i_ino);
289289 }
290
+ audit_getcwd();
290291 break;
291292 }
292293 case LSM_AUDIT_DATA_INODE: {
....@@ -305,6 +306,7 @@
305306 audit_log_format(ab, " dev=");
306307 audit_log_untrustedstring(ab, inode->i_sb->s_id);
307308 audit_log_format(ab, " ino=%lu", inode->i_ino);
309
+ audit_getcwd();
308310 break;
309311 }
310312 case LSM_AUDIT_DATA_TASK: {