summaryrefslogtreecommitdiffstats
path: root/ipc/mqueue.c
diff options
context:
space:
mode:
authorKrzysztof Benedyczak <golbi@mat.uni.torun.pl>2005-09-27 22:21:36 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-27 22:30:45 +0200
commit59175839783287d3b03f18460bb3539c69300837 (patch)
tree8abf324e8c8621d82774bb92a981a0629ae77944 /ipc/mqueue.c
parentMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 (diff)
downloadlinux-59175839783287d3b03f18460bb3539c69300837.tar.xz
linux-59175839783287d3b03f18460bb3539c69300837.zip
[PATCH] Make POSIX message queue sys_mq_open() honor umask
We ignored umask when creating new queues via mq_open (when creating with open() on mqueue fs it is ok of course). According to the specification this a bug. This trivial patch fixes this. Signed-off-by: Krzysztof Benedyczak <golbi@mat.uni.torun.pl> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'ipc/mqueue.c')
-rw-r--r--ipc/mqueue.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index 3a926011507b..a0f18c9cc89d 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -611,6 +611,7 @@ static struct file *do_create(struct dentry *dir, struct dentry *dentry,
dentry->d_fsdata = &attr;
}
+ mode &= ~current->fs->umask;
ret = vfs_create(dir->d_inode, dentry, mode, NULL);
dentry->d_fsdata = NULL;
if (ret)