diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2007-03-20 13:58:35 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2007-05-11 05:38:25 -0400 |
commit | a5cb013da773a67ee48d1c19e96436c22a73a7eb (patch) | |
tree | 8832d105c4742674423bd50352b8a4805c44fecc /include/linux/audit.h | |
parent | 129a84de2347002f09721cda3155ccfd19fade40 (diff) |
[PATCH] auditing ptrace
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/audit.h')
-rw-r--r-- | include/linux/audit.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h index 773e30df11ee..f93ce78cecbb 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -91,6 +91,7 @@ | |||
91 | #define AUDIT_MQ_GETSETATTR 1315 /* POSIX MQ get/set attribute record type */ | 91 | #define AUDIT_MQ_GETSETATTR 1315 /* POSIX MQ get/set attribute record type */ |
92 | #define AUDIT_KERNEL_OTHER 1316 /* For use by 3rd party modules */ | 92 | #define AUDIT_KERNEL_OTHER 1316 /* For use by 3rd party modules */ |
93 | #define AUDIT_FD_PAIR 1317 /* audit record for pipe/socketpair */ | 93 | #define AUDIT_FD_PAIR 1317 /* audit record for pipe/socketpair */ |
94 | #define AUDIT_OBJ_PID 1318 /* ptrace target */ | ||
94 | 95 | ||
95 | #define AUDIT_AVC 1400 /* SE Linux avc denial or grant */ | 96 | #define AUDIT_AVC 1400 /* SE Linux avc denial or grant */ |
96 | #define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */ | 97 | #define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */ |
@@ -352,6 +353,8 @@ extern void __audit_inode(const char *name, const struct inode *inode); | |||
352 | extern void __audit_inode_child(const char *dname, const struct inode *inode, | 353 | extern void __audit_inode_child(const char *dname, const struct inode *inode, |
353 | const struct inode *parent); | 354 | const struct inode *parent); |
354 | extern void __audit_inode_update(const struct inode *inode); | 355 | extern void __audit_inode_update(const struct inode *inode); |
356 | extern void __audit_ptrace(struct task_struct *t); | ||
357 | |||
355 | static inline int audit_dummy_context(void) | 358 | static inline int audit_dummy_context(void) |
356 | { | 359 | { |
357 | void *p = current->audit_context; | 360 | void *p = current->audit_context; |
@@ -377,6 +380,12 @@ static inline void audit_inode_update(const struct inode *inode) { | |||
377 | __audit_inode_update(inode); | 380 | __audit_inode_update(inode); |
378 | } | 381 | } |
379 | 382 | ||
383 | static inline void audit_ptrace(struct task_struct *t) | ||
384 | { | ||
385 | if (unlikely(!audit_dummy_context())) | ||
386 | __audit_ptrace(t); | ||
387 | } | ||
388 | |||
380 | /* Private API (for audit.c only) */ | 389 | /* Private API (for audit.c only) */ |
381 | extern unsigned int audit_serial(void); | 390 | extern unsigned int audit_serial(void); |
382 | extern void auditsc_get_stamp(struct audit_context *ctx, | 391 | extern void auditsc_get_stamp(struct audit_context *ctx, |
@@ -477,6 +486,7 @@ extern int audit_n_rules; | |||
477 | #define audit_mq_timedreceive(d,l,p,t) ({ 0; }) | 486 | #define audit_mq_timedreceive(d,l,p,t) ({ 0; }) |
478 | #define audit_mq_notify(d,n) ({ 0; }) | 487 | #define audit_mq_notify(d,n) ({ 0; }) |
479 | #define audit_mq_getsetattr(d,s) ({ 0; }) | 488 | #define audit_mq_getsetattr(d,s) ({ 0; }) |
489 | #define audit_ptrace(t) ((void)0) | ||
480 | #define audit_n_rules 0 | 490 | #define audit_n_rules 0 |
481 | #endif | 491 | #endif |
482 | 492 | ||