lkml.org 
[lkml]   [2005]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] umask in POSIX message queues
On Tue, 27 Sep 2005, Linus Torvalds wrote:

> On Tue, 27 Sep 2005, Krzysztof Benedyczak wrote:
> >
> > After rereading it I think that the better place for the line setting
> > umask is do_create() function as it will be on the same level as
> > open_namei(). I hope this change will clarify things.
> >
> > If this make sense I'll send a patch.
>
> Yes, that makes more sense.
>
> Please do send a tested patch,

Setting umask moved to do_create and tested once again.
Krzysiek

Signed-off-by: Krzysztof Benedyczak <golbi@mat.uni.torun.pl>

--- linux-2.6.14-rc2/ipc/mqueue.c.orig 2005-09-25 18:52:29.000000000 +0200
+++ linux-2.6.14-rc2/ipc/mqueue.c 2005-09-27 22:12:41.692903624 +0200
@@ -611,6 +611,7 @@ static struct file *do_create(struct den
dentry->d_fsdata = &attr;
}

+ mode &= ~current->fs->umask;
ret = vfs_create(dir->d_inode, dentry, mode, NULL);
dentry->d_fsdata = NULL;
if (ret)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-09-27 22:24    [W:0.100 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site