aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-05-21 16:08:09 -0400
committerDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-05-21 16:08:09 -0400
commitbfb4496e7239c9132d732a65cdcf3d6a7431ad1a (patch)
tree72a2068a1008a66db09ad6eebfdeb490f1a33308 /include
parent7b5d781ce1f19fb7382d3d3fb7af48e429bed12d (diff)
AUDIT: Assign serial number to non-syscall messages
Move audit_serial() into audit.c and use it to generate serial numbers on messages even when there is no audit context from syscall auditing. This allows us to disambiguate audit records when more than one is generated in the same millisecond. Based on a patch by Steve Grubb after he observed the problem. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/audit.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h
index 4b7caf0c6e10..3278ddf41ce6 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -219,8 +219,9 @@ extern void audit_inode(const char *name, const struct inode *inode);
219 /* Private API (for audit.c only) */ 219 /* Private API (for audit.c only) */
220extern int audit_receive_filter(int type, int pid, int uid, int seq, 220extern int audit_receive_filter(int type, int pid, int uid, int seq,
221 void *data, uid_t loginuid); 221 void *data, uid_t loginuid);
222extern int audit_get_stamp(struct audit_context *ctx, 222extern unsigned int audit_serial(void);
223 struct timespec *t, unsigned int *serial); 223extern void auditsc_get_stamp(struct audit_context *ctx,
224 struct timespec *t, unsigned int *serial);
224extern int audit_set_loginuid(struct task_struct *task, uid_t loginuid); 225extern int audit_set_loginuid(struct task_struct *task, uid_t loginuid);
225extern uid_t audit_get_loginuid(struct audit_context *ctx); 226extern uid_t audit_get_loginuid(struct audit_context *ctx);
226extern int audit_ipc_perms(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode); 227extern int audit_ipc_perms(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode);
@@ -237,7 +238,7 @@ extern void audit_signal_info(int sig, struct task_struct *t);
237#define audit_putname(n) do { ; } while (0) 238#define audit_putname(n) do { ; } while (0)
238#define audit_inode(n,i) do { ; } while (0) 239#define audit_inode(n,i) do { ; } while (0)
239#define audit_receive_filter(t,p,u,s,d,l) ({ -EOPNOTSUPP; }) 240#define audit_receive_filter(t,p,u,s,d,l) ({ -EOPNOTSUPP; })
240#define audit_get_stamp(c,t,s) ({ 0; }) 241#define auditsc_get_stamp(c,t,s) do { BUG(); } while (0)
241#define audit_get_loginuid(c) ({ -1; }) 242#define audit_get_loginuid(c) ({ -1; })
242#define audit_ipc_perms(q,u,g,m) ({ 0; }) 243#define audit_ipc_perms(q,u,g,m) ({ 0; })
243#define audit_socketcall(n,a) ({ 0; }) 244#define audit_socketcall(n,a) ({ 0; })