Re: [PATCH] umask in POSIX message queues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>

--- 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux