From: Krzysztof Benedyczak Date: Tue, 27 Sep 2005 20:21:36 +0000 (+0200) Subject: [PATCH] Make POSIX message queue sys_mq_open() honor umask X-Git-Tag: v2.6.14-rc3~102 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=59175839783287d3b03f18460bb3539c69300837;p=platform%2Fkernel%2Flinux-exynos.git [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 Signed-off-by: Linus Torvalds --- diff --git a/ipc/mqueue.c b/ipc/mqueue.c index 3a92601..a0f18c9 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)