diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/auditsc.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index 41d129a78793..25d890e997f2 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c | |||
@@ -1476,33 +1476,6 @@ update_context: | |||
1476 | } | 1476 | } |
1477 | 1477 | ||
1478 | /** | 1478 | /** |
1479 | * audit_inode_update - update inode info for last collected name | ||
1480 | * @inode: inode being audited | ||
1481 | * | ||
1482 | * When open() is called on an existing object with the O_CREAT flag, the inode | ||
1483 | * data audit initially collects is incorrect. This additional hook ensures | ||
1484 | * audit has the inode data for the actual object to be opened. | ||
1485 | */ | ||
1486 | void __audit_inode_update(const struct inode *inode) | ||
1487 | { | ||
1488 | struct audit_context *context = current->audit_context; | ||
1489 | int idx; | ||
1490 | |||
1491 | if (!context->in_syscall || !inode) | ||
1492 | return; | ||
1493 | |||
1494 | if (context->name_count == 0) { | ||
1495 | context->name_count++; | ||
1496 | #if AUDIT_DEBUG | ||
1497 | context->ino_count++; | ||
1498 | #endif | ||
1499 | } | ||
1500 | idx = context->name_count - 1; | ||
1501 | |||
1502 | audit_copy_inode(&context->names[idx], inode); | ||
1503 | } | ||
1504 | |||
1505 | /** | ||
1506 | * auditsc_get_stamp - get local copies of audit_context values | 1479 | * auditsc_get_stamp - get local copies of audit_context values |
1507 | * @ctx: audit_context for the task | 1480 | * @ctx: audit_context for the task |
1508 | * @t: timespec to store time recorded in the audit_context | 1481 | * @t: timespec to store time recorded in the audit_context |