diff options
| author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-11 12:57:16 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-11 12:57:16 -0400 |
| commit | 853da0022023c046e0a5ccc51d427745f0c94de7 (patch) | |
| tree | bc36f80f00aa11c3c239a80ecf04ba8238219ce8 /include | |
| parent | 5884c40668a928bba017eaf54e2eb3c01c8a98e6 (diff) | |
| parent | 0a4ff8c2598b72f2fa9d50aae9e1809e684dbf41 (diff) | |
Merge branch 'audit.b38' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current
* 'audit.b38' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current:
[PATCH] Abnormal End of Processes
[PATCH] match audit name data
[PATCH] complete message queue auditing
[PATCH] audit inode for all xattr syscalls
[PATCH] initialize name osid
[PATCH] audit signal recipients
[PATCH] add SIGNAL syscall class (v3)
[PATCH] auditing ptrace
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-generic/audit_signal.h | 3 | ||||
| -rw-r--r-- | include/linux/audit.h | 21 |
2 files changed, 19 insertions, 5 deletions
diff --git a/include/asm-generic/audit_signal.h b/include/asm-generic/audit_signal.h new file mode 100644 index 0000000000..6feab7f18a --- /dev/null +++ b/include/asm-generic/audit_signal.h | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | __NR_kill, | ||
| 2 | __NR_tgkill, | ||
| 3 | __NR_tkill, | ||
diff --git a/include/linux/audit.h b/include/linux/audit.h index 773e30df11..fccc6e5029 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 */ |
| @@ -111,6 +112,7 @@ | |||
| 111 | #define AUDIT_FIRST_KERN_ANOM_MSG 1700 | 112 | #define AUDIT_FIRST_KERN_ANOM_MSG 1700 |
| 112 | #define AUDIT_LAST_KERN_ANOM_MSG 1799 | 113 | #define AUDIT_LAST_KERN_ANOM_MSG 1799 |
| 113 | #define AUDIT_ANOM_PROMISCUOUS 1700 /* Device changed promiscuous mode */ | 114 | #define AUDIT_ANOM_PROMISCUOUS 1700 /* Device changed promiscuous mode */ |
| 115 | #define AUDIT_ANOM_ABEND 1701 /* Process ended abnormally */ | ||
| 114 | 116 | ||
| 115 | #define AUDIT_KERNEL 2000 /* Asynchronous audit record. NOT A REQUEST. */ | 117 | #define AUDIT_KERNEL 2000 /* Asynchronous audit record. NOT A REQUEST. */ |
| 116 | 118 | ||
| @@ -148,6 +150,8 @@ | |||
| 148 | #define AUDIT_CLASS_READ_32 5 | 150 | #define AUDIT_CLASS_READ_32 5 |
| 149 | #define AUDIT_CLASS_WRITE 6 | 151 | #define AUDIT_CLASS_WRITE 6 |
| 150 | #define AUDIT_CLASS_WRITE_32 7 | 152 | #define AUDIT_CLASS_WRITE_32 7 |
| 153 | #define AUDIT_CLASS_SIGNAL 8 | ||
| 154 | #define AUDIT_CLASS_SIGNAL_32 9 | ||
| 151 | 155 | ||
| 152 | /* This bitmask is used to validate user input. It represents all bits that | 156 | /* This bitmask is used to validate user input. It represents all bits that |
| 153 | * are currently used in an audit field constant understood by the kernel. | 157 | * are currently used in an audit field constant understood by the kernel. |
| @@ -337,6 +341,7 @@ struct mqstat; | |||
| 337 | #define AUDITSC_RESULT(x) ( ((long)(x))<0?AUDITSC_FAILURE:AUDITSC_SUCCESS ) | 341 | #define AUDITSC_RESULT(x) ( ((long)(x))<0?AUDITSC_FAILURE:AUDITSC_SUCCESS ) |
| 338 | extern int __init audit_register_class(int class, unsigned *list); | 342 | extern int __init audit_register_class(int class, unsigned *list); |
| 339 | extern int audit_classify_syscall(int abi, unsigned syscall); | 343 | extern int audit_classify_syscall(int abi, unsigned syscall); |
| 344 | extern int audit_classify_arch(int arch); | ||
| 340 | #ifdef CONFIG_AUDITSYSCALL | 345 | #ifdef CONFIG_AUDITSYSCALL |
| 341 | /* These are defined in auditsc.c */ | 346 | /* These are defined in auditsc.c */ |
| 342 | /* Public API */ | 347 | /* Public API */ |
| @@ -351,7 +356,8 @@ extern void audit_putname(const char *name); | |||
| 351 | extern void __audit_inode(const char *name, const struct inode *inode); | 356 | extern void __audit_inode(const char *name, const struct inode *inode); |
| 352 | extern void __audit_inode_child(const char *dname, const struct inode *inode, | 357 | extern void __audit_inode_child(const char *dname, const struct inode *inode, |
| 353 | const struct inode *parent); | 358 | const struct inode *parent); |
| 354 | extern void __audit_inode_update(const struct inode *inode); | 359 | extern void __audit_ptrace(struct task_struct *t); |
| 360 | |||
| 355 | static inline int audit_dummy_context(void) | 361 | static inline int audit_dummy_context(void) |
| 356 | { | 362 | { |
| 357 | void *p = current->audit_context; | 363 | void *p = current->audit_context; |
| @@ -372,9 +378,12 @@ static inline void audit_inode_child(const char *dname, | |||
| 372 | if (unlikely(!audit_dummy_context())) | 378 | if (unlikely(!audit_dummy_context())) |
| 373 | __audit_inode_child(dname, inode, parent); | 379 | __audit_inode_child(dname, inode, parent); |
| 374 | } | 380 | } |
| 375 | static inline void audit_inode_update(const struct inode *inode) { | 381 | void audit_core_dumps(long signr); |
| 382 | |||
| 383 | static inline void audit_ptrace(struct task_struct *t) | ||
| 384 | { | ||
| 376 | if (unlikely(!audit_dummy_context())) | 385 | if (unlikely(!audit_dummy_context())) |
| 377 | __audit_inode_update(inode); | 386 | __audit_ptrace(t); |
| 378 | } | 387 | } |
| 379 | 388 | ||
| 380 | /* Private API (for audit.c only) */ | 389 | /* Private API (for audit.c only) */ |
| @@ -447,6 +456,7 @@ static inline int audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat) | |||
| 447 | return 0; | 456 | return 0; |
| 448 | } | 457 | } |
| 449 | extern int audit_n_rules; | 458 | extern int audit_n_rules; |
| 459 | extern int audit_signals; | ||
| 450 | #else | 460 | #else |
| 451 | #define audit_alloc(t) ({ 0; }) | 461 | #define audit_alloc(t) ({ 0; }) |
| 452 | #define audit_free(t) do { ; } while (0) | 462 | #define audit_free(t) do { ; } while (0) |
| @@ -457,10 +467,9 @@ extern int audit_n_rules; | |||
| 457 | #define audit_putname(n) do { ; } while (0) | 467 | #define audit_putname(n) do { ; } while (0) |
| 458 | #define __audit_inode(n,i) do { ; } while (0) | 468 | #define __audit_inode(n,i) do { ; } while (0) |
| 459 | #define __audit_inode_child(d,i,p) do { ; } while (0) | 469 | #define __audit_inode_child(d,i,p) do { ; } while (0) |
| 460 | #define __audit_inode_update(i) do { ; } while (0) | ||
| 461 | #define audit_inode(n,i) do { ; } while (0) | 470 | #define audit_inode(n,i) do { ; } while (0) |
| 462 | #define audit_inode_child(d,i,p) do { ; } while (0) | 471 | #define audit_inode_child(d,i,p) do { ; } while (0) |
| 463 | #define audit_inode_update(i) do { ; } while (0) | 472 | #define audit_core_dumps(i) do { ; } while (0) |
| 464 | #define auditsc_get_stamp(c,t,s) do { BUG(); } while (0) | 473 | #define auditsc_get_stamp(c,t,s) do { BUG(); } while (0) |
| 465 | #define audit_get_loginuid(c) ({ -1; }) | 474 | #define audit_get_loginuid(c) ({ -1; }) |
| 466 | #define audit_log_task_context(b) do { ; } while (0) | 475 | #define audit_log_task_context(b) do { ; } while (0) |
| @@ -477,7 +486,9 @@ 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 |
| 491 | #define audit_signals 0 | ||
| 481 | #endif | 492 | #endif |
| 482 | 493 | ||
| 483 | #ifdef CONFIG_AUDIT | 494 | #ifdef CONFIG_AUDIT |
