aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-19 16:29:54 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-19 16:29:54 -0500
commitcb4aaf46c0283dd79ab2e8b8b165c0bf13ab6194 (patch)
tree2e01de06d4740300cfcfbb9e9f9fd3b7078dd3ce /include/linux
parent874ff01bd9183ad16495acfd54e93a619d12b8b5 (diff)
parentdb3495099d3d52854b13874905af6e40a91f4721 (diff)
Merge branch 'audit.b37' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current
* 'audit.b37' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current: [PATCH] AUDIT_FD_PAIR [PATCH] audit config lockdown [PATCH] minor update to rule add/delete messages (ver 2)
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/audit.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h
index 0e07db6cc0d0..229fa012c893 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -89,6 +89,7 @@
89#define AUDIT_MQ_NOTIFY 1314 /* POSIX MQ notify record type */ 89#define AUDIT_MQ_NOTIFY 1314 /* POSIX MQ notify record type */
90#define AUDIT_MQ_GETSETATTR 1315 /* POSIX MQ get/set attribute record type */ 90#define AUDIT_MQ_GETSETATTR 1315 /* POSIX MQ get/set attribute record type */
91#define AUDIT_KERNEL_OTHER 1316 /* For use by 3rd party modules */ 91#define AUDIT_KERNEL_OTHER 1316 /* For use by 3rd party modules */
92#define AUDIT_FD_PAIR 1317 /* audit record for pipe/socketpair */
92 93
93#define AUDIT_AVC 1400 /* SE Linux avc denial or grant */ 94#define AUDIT_AVC 1400 /* SE Linux avc denial or grant */
94#define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */ 95#define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */
@@ -387,6 +388,7 @@ extern int __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode
387extern int audit_bprm(struct linux_binprm *bprm); 388extern int audit_bprm(struct linux_binprm *bprm);
388extern int audit_socketcall(int nargs, unsigned long *args); 389extern int audit_socketcall(int nargs, unsigned long *args);
389extern int audit_sockaddr(int len, void *addr); 390extern int audit_sockaddr(int len, void *addr);
391extern int __audit_fd_pair(int fd1, int fd2);
390extern int audit_avc_path(struct dentry *dentry, struct vfsmount *mnt); 392extern int audit_avc_path(struct dentry *dentry, struct vfsmount *mnt);
391extern int audit_set_macxattr(const char *name); 393extern int audit_set_macxattr(const char *name);
392extern int __audit_mq_open(int oflag, mode_t mode, struct mq_attr __user *u_attr); 394extern int __audit_mq_open(int oflag, mode_t mode, struct mq_attr __user *u_attr);
@@ -401,6 +403,12 @@ static inline int audit_ipc_obj(struct kern_ipc_perm *ipcp)
401 return __audit_ipc_obj(ipcp); 403 return __audit_ipc_obj(ipcp);
402 return 0; 404 return 0;
403} 405}
406static inline int audit_fd_pair(int fd1, int fd2)
407{
408 if (unlikely(!audit_dummy_context()))
409 return __audit_fd_pair(fd1, fd2);
410 return 0;
411}
404static inline int audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode) 412static inline int audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode)
405{ 413{
406 if (unlikely(!audit_dummy_context())) 414 if (unlikely(!audit_dummy_context()))
@@ -459,6 +467,7 @@ extern int audit_n_rules;
459#define audit_ipc_set_perm(q,u,g,m) ({ 0; }) 467#define audit_ipc_set_perm(q,u,g,m) ({ 0; })
460#define audit_bprm(p) ({ 0; }) 468#define audit_bprm(p) ({ 0; })
461#define audit_socketcall(n,a) ({ 0; }) 469#define audit_socketcall(n,a) ({ 0; })
470#define audit_fd_pair(n,a) ({ 0; })
462#define audit_sockaddr(len, addr) ({ 0; }) 471#define audit_sockaddr(len, addr) ({ 0; })
463#define audit_avc_path(dentry, mnt) ({ 0; }) 472#define audit_avc_path(dentry, mnt) ({ 0; })
464#define audit_set_macxattr(n) do { ; } while (0) 473#define audit_set_macxattr(n) do { ; } while (0)