.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * common LSM auditing functions |
---|
3 | 4 | * |
---|
.. | .. |
---|
5 | 6 | * Stephen Smalley, <sds@tycho.nsa.gov> |
---|
6 | 7 | * James Morris <jmorris@redhat.com> |
---|
7 | 8 | * 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. |
---|
12 | 9 | */ |
---|
13 | 10 | |
---|
14 | 11 | #include <linux/types.h> |
---|
.. | .. |
---|
243 | 240 | audit_log_untrustedstring(ab, inode->i_sb->s_id); |
---|
244 | 241 | audit_log_format(ab, " ino=%lu", inode->i_ino); |
---|
245 | 242 | } |
---|
| 243 | + audit_getcwd(); |
---|
246 | 244 | break; |
---|
247 | 245 | } |
---|
248 | 246 | case LSM_AUDIT_DATA_FILE: { |
---|
.. | .. |
---|
256 | 254 | audit_log_untrustedstring(ab, inode->i_sb->s_id); |
---|
257 | 255 | audit_log_format(ab, " ino=%lu", inode->i_ino); |
---|
258 | 256 | } |
---|
| 257 | + audit_getcwd(); |
---|
259 | 258 | break; |
---|
260 | 259 | } |
---|
261 | 260 | case LSM_AUDIT_DATA_IOCTL_OP: { |
---|
.. | .. |
---|
271 | 270 | } |
---|
272 | 271 | |
---|
273 | 272 | audit_log_format(ab, " ioctlcmd=0x%hx", a->u.op->cmd); |
---|
| 273 | + audit_getcwd(); |
---|
274 | 274 | break; |
---|
275 | 275 | } |
---|
276 | 276 | case LSM_AUDIT_DATA_DENTRY: { |
---|
.. | .. |
---|
287 | 287 | audit_log_untrustedstring(ab, inode->i_sb->s_id); |
---|
288 | 288 | audit_log_format(ab, " ino=%lu", inode->i_ino); |
---|
289 | 289 | } |
---|
| 290 | + audit_getcwd(); |
---|
290 | 291 | break; |
---|
291 | 292 | } |
---|
292 | 293 | case LSM_AUDIT_DATA_INODE: { |
---|
.. | .. |
---|
305 | 306 | audit_log_format(ab, " dev="); |
---|
306 | 307 | audit_log_untrustedstring(ab, inode->i_sb->s_id); |
---|
307 | 308 | audit_log_format(ab, " ino=%lu", inode->i_ino); |
---|
| 309 | + audit_getcwd(); |
---|
308 | 310 | break; |
---|
309 | 311 | } |
---|
310 | 312 | case LSM_AUDIT_DATA_TASK: { |
---|