Skip to content

Commit

Permalink
[PATCH] Make POSIX message queue sys_mq_open() honor umask
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Krzysztof Benedyczak authored and Linus Torvalds committed Sep 27, 2005
1 parent 5c1f4ca commit 5917583
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ipc/mqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5917583

Please sign in to comment.