summaryrefslogtreecommitdiff
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 13:30:45 -0700
commit59175839783287d3b03f18460bb3539c69300837 (patch)
tree8abf324e8c8621d82774bb92a981a0629ae77944 /ipc/mqueue.c
parent5c1f4cac6ff75a4a602bae960a054ed3df7e9765 (diff)
[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 3a926011507..a0f18c9cc89 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)