aboutsummaryrefslogtreecommitdiffstats
path: root/ipc/mqueue.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-11 12:57:16 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-11 12:57:16 -0400
commit853da0022023c046e0a5ccc51d427745f0c94de7 (patch)
treebc36f80f00aa11c3c239a80ecf04ba8238219ce8 /ipc/mqueue.c
parent5884c40668a928bba017eaf54e2eb3c01c8a98e6 (diff)
parent0a4ff8c2598b72f2fa9d50aae9e1809e684dbf41 (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 'ipc/mqueue.c')
-rw-r--r--ipc/mqueue.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index d17821d3f483..fab5707cb5f7 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -681,6 +681,7 @@ asmlinkage long sys_mq_open(const char __user *u_name, int oflag, mode_t mode,
681 681
682 if (oflag & O_CREAT) { 682 if (oflag & O_CREAT) {
683 if (dentry->d_inode) { /* entry already exists */ 683 if (dentry->d_inode) { /* entry already exists */
684 audit_inode(name, dentry->d_inode);
684 error = -EEXIST; 685 error = -EEXIST;
685 if (oflag & O_EXCL) 686 if (oflag & O_EXCL)
686 goto out; 687 goto out;
@@ -693,6 +694,7 @@ asmlinkage long sys_mq_open(const char __user *u_name, int oflag, mode_t mode,
693 error = -ENOENT; 694 error = -ENOENT;
694 if (!dentry->d_inode) 695 if (!dentry->d_inode)
695 goto out; 696 goto out;
697 audit_inode(name, dentry->d_inode);
696 filp = do_open(dentry, oflag); 698 filp = do_open(dentry, oflag);
697 } 699 }
698 700
@@ -840,6 +842,7 @@ asmlinkage long sys_mq_timedsend(mqd_t mqdes, const char __user *u_msg_ptr,
840 if (unlikely(filp->f_op != &mqueue_file_operations)) 842 if (unlikely(filp->f_op != &mqueue_file_operations))
841 goto out_fput; 843 goto out_fput;
842 info = MQUEUE_I(inode); 844 info = MQUEUE_I(inode);
845 audit_inode(NULL, inode);
843 846
844 if (unlikely(!(filp->f_mode & FMODE_WRITE))) 847 if (unlikely(!(filp->f_mode & FMODE_WRITE)))
845 goto out_fput; 848 goto out_fput;
@@ -923,6 +926,7 @@ asmlinkage ssize_t sys_mq_timedreceive(mqd_t mqdes, char __user *u_msg_ptr,
923 if (unlikely(filp->f_op != &mqueue_file_operations)) 926 if (unlikely(filp->f_op != &mqueue_file_operations))
924 goto out_fput; 927 goto out_fput;
925 info = MQUEUE_I(inode); 928 info = MQUEUE_I(inode);
929 audit_inode(NULL, inode);
926 930
927 if (unlikely(!(filp->f_mode & FMODE_READ))) 931 if (unlikely(!(filp->f_mode & FMODE_READ)))
928 goto out_fput; 932 goto out_fput;