aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-30 11:35:35 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-30 11:35:35 -0400
commit847f877600313e65c5659476b30d74a6f66e388e (patch)
treeb4390fb56dc3c9a47cb51f3a086515a376cffc0c /include
parent79346507ad48895f41b438fa562b1965721f36b9 (diff)
parent120a795da07c9a02221ca23464c28a7c6ad7de1d (diff)
Merge branch 'audit.b64' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current
* 'audit.b64' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current: audit mmap audit: make link()/linkat() match "attribute change" predicate audit: Use rcu for task lookup protection audit: Do not send uninitialized data for AUDIT_TTY_GET audit: Call tty_audit_push_task() outside preempt disabled in untag_chunk() we need to do alloc_chunk() a bit earlier audit: make functions static Audit: add support to match lsm labels on user audit messages
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/audit_change_attr.h4
-rw-r--r--include/linux/audit.h9
-rw-r--r--include/linux/tty.h9
3 files changed, 18 insertions, 4 deletions
diff --git a/include/asm-generic/audit_change_attr.h b/include/asm-generic/audit_change_attr.h
index 50764550a60c..bcbab3e4a3be 100644
--- a/include/asm-generic/audit_change_attr.h
+++ b/include/asm-generic/audit_change_attr.h
@@ -20,3 +20,7 @@ __NR_chown32,
20__NR_fchown32, 20__NR_fchown32,
21__NR_lchown32, 21__NR_lchown32,
22#endif 22#endif
23__NR_link,
24#ifdef __NR_linkat
25__NR_linkat,
26#endif
diff --git a/include/linux/audit.h b/include/linux/audit.h
index e24afabc548f..8b5c0620abf9 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -102,6 +102,7 @@
102#define AUDIT_EOE 1320 /* End of multi-record event */ 102#define AUDIT_EOE 1320 /* End of multi-record event */
103#define AUDIT_BPRM_FCAPS 1321 /* Information about fcaps increasing perms */ 103#define AUDIT_BPRM_FCAPS 1321 /* Information about fcaps increasing perms */
104#define AUDIT_CAPSET 1322 /* Record showing argument to sys_capset */ 104#define AUDIT_CAPSET 1322 /* Record showing argument to sys_capset */
105#define AUDIT_MMAP 1323 /* Record showing descriptor and flags in mmap */
105 106
106#define AUDIT_AVC 1400 /* SE Linux avc denial or grant */ 107#define AUDIT_AVC 1400 /* SE Linux avc denial or grant */
107#define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */ 108#define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */
@@ -478,6 +479,7 @@ extern int __audit_log_bprm_fcaps(struct linux_binprm *bprm,
478 const struct cred *new, 479 const struct cred *new,
479 const struct cred *old); 480 const struct cred *old);
480extern void __audit_log_capset(pid_t pid, const struct cred *new, const struct cred *old); 481extern void __audit_log_capset(pid_t pid, const struct cred *new, const struct cred *old);
482extern void __audit_mmap_fd(int fd, int flags);
481 483
482static inline void audit_ipc_obj(struct kern_ipc_perm *ipcp) 484static inline void audit_ipc_obj(struct kern_ipc_perm *ipcp)
483{ 485{
@@ -531,6 +533,12 @@ static inline void audit_log_capset(pid_t pid, const struct cred *new,
531 __audit_log_capset(pid, new, old); 533 __audit_log_capset(pid, new, old);
532} 534}
533 535
536static inline void audit_mmap_fd(int fd, int flags)
537{
538 if (unlikely(!audit_dummy_context()))
539 __audit_mmap_fd(fd, flags);
540}
541
534extern int audit_n_rules; 542extern int audit_n_rules;
535extern int audit_signals; 543extern int audit_signals;
536#else 544#else
@@ -564,6 +572,7 @@ extern int audit_signals;
564#define audit_mq_getsetattr(d,s) ((void)0) 572#define audit_mq_getsetattr(d,s) ((void)0)
565#define audit_log_bprm_fcaps(b, ncr, ocr) ({ 0; }) 573#define audit_log_bprm_fcaps(b, ncr, ocr) ({ 0; })
566#define audit_log_capset(pid, ncr, ocr) ((void)0) 574#define audit_log_capset(pid, ncr, ocr) ((void)0)
575#define audit_mmap_fd(fd, flags) ((void)0)
567#define audit_ptrace(t) ((void)0) 576#define audit_ptrace(t) ((void)0)
568#define audit_n_rules 0 577#define audit_n_rules 0
569#define audit_signals 0 578#define audit_signals 0
diff --git a/include/linux/tty.h b/include/linux/tty.h
index e500171c745f..2a754748dd5f 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -541,8 +541,8 @@ extern void tty_audit_exit(void);
541extern void tty_audit_fork(struct signal_struct *sig); 541extern void tty_audit_fork(struct signal_struct *sig);
542extern void tty_audit_tiocsti(struct tty_struct *tty, char ch); 542extern void tty_audit_tiocsti(struct tty_struct *tty, char ch);
543extern void tty_audit_push(struct tty_struct *tty); 543extern void tty_audit_push(struct tty_struct *tty);
544extern void tty_audit_push_task(struct task_struct *tsk, 544extern int tty_audit_push_task(struct task_struct *tsk,
545 uid_t loginuid, u32 sessionid); 545 uid_t loginuid, u32 sessionid);
546#else 546#else
547static inline void tty_audit_add_data(struct tty_struct *tty, 547static inline void tty_audit_add_data(struct tty_struct *tty,
548 unsigned char *data, size_t size) 548 unsigned char *data, size_t size)
@@ -560,9 +560,10 @@ static inline void tty_audit_fork(struct signal_struct *sig)
560static inline void tty_audit_push(struct tty_struct *tty) 560static inline void tty_audit_push(struct tty_struct *tty)
561{ 561{
562} 562}
563static inline void tty_audit_push_task(struct task_struct *tsk, 563static inline int tty_audit_push_task(struct task_struct *tsk,
564 uid_t loginuid, u32 sessionid) 564 uid_t loginuid, u32 sessionid)
565{ 565{
566 return 0;
566} 567}
567#endif 568#endif
568 569