History

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

Linus Torvalds committed 19 years ago

Commit 853da002 parents 5884c40 0a4ff8c22 files · +439 −101Browse files

Showing the changes to include (2 of 22 files). Show all

Unified · Split

2 files
  1. include/asm-generic/audit_signal.h +3 −0
  2. include/linux/audit.h +16 −5
include/asm-generic/audit_signal.h+3−0
@@ -0,0 +1,3 @@
1+__NR_kill,
2+__NR_tgkill,
3+__NR_tkill,
include/linux/audit.h+16−5
@@ -91,6 +91,7 @@ · 90 unmodified lines
9191 #define AUDIT_MQ_GETSETATTR 1315 /* POSIX MQ get/set attribute record type */
9292 #define AUDIT_KERNEL_OTHER 1316 /* For use by 3rd party modules */
9393 #define AUDIT_FD_PAIR 1317 /* audit record for pipe/socketpair */
94+#define AUDIT_OBJ_PID 1318 /* ptrace target */
9495
9596 #define AUDIT_AVC 1400 /* SE Linux avc denial or grant */
9697 #define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */
@@ -111,6 +112,7 @@ · 14 unmodified lines
111112 #define AUDIT_FIRST_KERN_ANOM_MSG 1700
112113 #define AUDIT_LAST_KERN_ANOM_MSG 1799
113114 #define AUDIT_ANOM_PROMISCUOUS 1700 /* Device changed promiscuous mode */
115+#define AUDIT_ANOM_ABEND 1701 /* Process ended abnormally */
114116
115117 #define AUDIT_KERNEL 2000 /* Asynchronous audit record. NOT A REQUEST. */
116118
@@ -148,6 +150,8 @@ · 31 unmodified lines
148150 #define AUDIT_CLASS_READ_32 5
149151 #define AUDIT_CLASS_WRITE 6
150152 #define AUDIT_CLASS_WRITE_32 7
153+#define AUDIT_CLASS_SIGNAL 8
154+#define AUDIT_CLASS_SIGNAL_32 9
151155
152156 /* This bitmask is used to validate user input. It represents all bits that
153157 * are currently used in an audit field constant understood by the kernel.
@@ -337,6 +341,7 @@ struct mqstat; · 183 unmodified lines
337341 #define AUDITSC_RESULT(x) ( ((long)(x))<0?AUDITSC_FAILURE:AUDITSC_SUCCESS )
338342 extern int __init audit_register_class(int class, unsigned *list);
339343 extern int audit_classify_syscall(int abi, unsigned syscall);
344+extern int audit_classify_arch(int arch);
340345 #ifdef CONFIG_AUDITSYSCALL
341346 /* These are defined in auditsc.c */
342347 /* Public API */
@@ -351,7 +356,8 @@ extern void audit_putname(const char *name); · 8 unmodified lines
351356 extern void __audit_inode(const char *name, const struct inode *inode);
352357 extern void __audit_inode_child(const char *dname, const struct inode *inode,
353358 const struct inode *parent);
354−extern void __audit_inode_update(const struct inode *inode);
359+extern void __audit_ptrace(struct task_struct *t);
360+
355361 static inline int audit_dummy_context(void)
356362 {
357363 void *p = current->audit_context;
@@ -372,9 +378,12 @@ static inline void audit_inode_child(const char *dname, · 14 unmodified lines
372378 if (unlikely(!audit_dummy_context()))
373379 __audit_inode_child(dname, inode, parent);
374380 }
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+{
376385 if (unlikely(!audit_dummy_context()))
377− __audit_inode_update(inode);
386+ __audit_ptrace(t);
378387 }
379388
380389 /* Private API (for audit.c only) */
@@ -447,6 +456,7 @@ static inline int audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat) · 66 unmodified lines
447456 return 0;
448457 }
449458 extern int audit_n_rules;
459+extern int audit_signals;
450460 #else
451461 #define audit_alloc(t) ({ 0; })
452462 #define audit_free(t) do { ; } while (0)
@@ -457,10 +467,9 @@ extern int audit_n_rules; · 4 unmodified lines
457467 #define audit_putname(n) do { ; } while (0)
458468 #define __audit_inode(n,i) do { ; } while (0)
459469 #define __audit_inode_child(d,i,p) do { ; } while (0)
460−#define __audit_inode_update(i) do { ; } while (0)
461470 #define audit_inode(n,i) do { ; } while (0)
462471 #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)
464473 #define auditsc_get_stamp(c,t,s) do { BUG(); } while (0)
465474 #define audit_get_loginuid(c) ({ -1; })
466475 #define audit_log_task_context(b) do { ; } while (0)
@@ -477,7 +486,9 @@ extern int audit_n_rules; · 10 unmodified lines
477486 #define audit_mq_timedreceive(d,l,p,t) ({ 0; })
478487 #define audit_mq_notify(d,n) ({ 0; })
479488 #define audit_mq_getsetattr(d,s) ({ 0; })
489+#define audit_ptrace(t) ((void)0)
480490 #define audit_n_rules 0
491+#define audit_signals 0
481492 #endif
482493
483494 #ifdef CONFIG_AUDIT