diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2008-12-06 01:05:50 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-12-09 02:27:41 -0500 |
commit | 48887e63d6e057543067327da6b091297f7fe645 (patch) | |
tree | f290af5a887bcf840a63043eb2df3a4c02ccaea3 /include/linux | |
parent | 7f0ed77d241b60f70136f15b8eef30a3de1fa249 (diff) |
[PATCH] fix broken timestamps in AVC generated by kernel threads
Timestamp in audit_context is valid only if ->in_syscall is set.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/audit.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h index 1b2a6a5c1876..8f0672d13eb1 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -435,7 +435,7 @@ static inline void audit_ptrace(struct task_struct *t) | |||
435 | 435 | ||
436 | /* Private API (for audit.c only) */ | 436 | /* Private API (for audit.c only) */ |
437 | extern unsigned int audit_serial(void); | 437 | extern unsigned int audit_serial(void); |
438 | extern void auditsc_get_stamp(struct audit_context *ctx, | 438 | extern int auditsc_get_stamp(struct audit_context *ctx, |
439 | struct timespec *t, unsigned int *serial); | 439 | struct timespec *t, unsigned int *serial); |
440 | extern int audit_set_loginuid(struct task_struct *task, uid_t loginuid); | 440 | extern int audit_set_loginuid(struct task_struct *task, uid_t loginuid); |
441 | #define audit_get_loginuid(t) ((t)->loginuid) | 441 | #define audit_get_loginuid(t) ((t)->loginuid) |
@@ -518,7 +518,7 @@ extern int audit_signals; | |||
518 | #define audit_inode(n,d) do { ; } while (0) | 518 | #define audit_inode(n,d) do { ; } while (0) |
519 | #define audit_inode_child(d,i,p) do { ; } while (0) | 519 | #define audit_inode_child(d,i,p) do { ; } while (0) |
520 | #define audit_core_dumps(i) do { ; } while (0) | 520 | #define audit_core_dumps(i) do { ; } while (0) |
521 | #define auditsc_get_stamp(c,t,s) do { BUG(); } while (0) | 521 | #define auditsc_get_stamp(c,t,s) (0) |
522 | #define audit_get_loginuid(t) (-1) | 522 | #define audit_get_loginuid(t) (-1) |
523 | #define audit_get_sessionid(t) (-1) | 523 | #define audit_get_sessionid(t) (-1) |
524 | #define audit_log_task_context(b) do { ; } while (0) | 524 | #define audit_log_task_context(b) do { ; } while (0) |