xfs
[Top] [All Lists]

Re: umask fix (patch)

To: lord@xxxxxxx
Subject: Re: umask fix (patch)
From: Andrew Tridgell <tridge@xxxxxxxxxxx>
Date: Thu, 26 Jul 2001 17:23:42 -0700 (PDT)
Cc: kaos@xxxxxxxxxxxxxxxxx, linux-xfs@xxxxxxxxxxx
In-reply-to: <200107261953.f6QJrO518223@xxxxxxxxxxxxxxxxxxxx> (message from Steve Lord on Thu, 26 Jul 2001 14:53:24 -0500)
References: <200107261953.f6QJrO518223@xxxxxxxxxxxxxxxxxxxx>
Reply-to: tridge@xxxxxxxxxxx
Sender: owner-linux-xfs@xxxxxxxxxxx
I think that nfsd should always run with a umask of 0, its umask
should not depend on what umask was set in the sysadmins shell when it
was launched. So nfsd should get its own fs context when it starts up
(preferably in daemonise()) then it should set the umask to
0.

Running nfsd with some random umask is just asking for trouble in the
future. If we _really_ want to do that then we should force the umask
to 0777 in nfsd so that we at least catch these bugs quickly.

>       if (strcmp(current->comm, "nfsd") && !have_default_acl) {
>               mode &= ~current->fs->umask;
>       }
> 
> I think that would fix it, but I really don't like it.

arrgh - that is truly awful! Don't be tempted :)


btw, to see a related problem with sharing fs/file contexts in the
kernel try this:

        ls -l /proc/*/fd | grep initctl

I submitted a patch to Linus a few weeks back to try to fix this by
not using CLONE_* flags so agressively for kernel threads. I'll try
submitting it again when I get time.




<Prev in Thread] Current Thread [Next in Thread>