[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 <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Krzysztof Benedyczak 2005-09-27 22:21:36 +02:00 • committed by Linus Torvalds
commit 5917583978

View file

@ -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)