2007-12-01 11:37:05

by Roger Willcocks

[permalink] [raw]
Subject: Re: [NFS] nfsd bug: create file with specific uid/gid

J. Bruce Fields wrote:

> On Fri, Nov 30, 2007 at 05:06:03PM +0000, Roger Willcocks wrote:
>> nfsd/vfs.c:nfsd_create (the v2 version of create) says:
>>
>> "Set file attributes. Mode has already been set and
>> setting uid/gid works only for root"
>>
>> but it doesn't actually test for root-ness
...
> Assignments (especially with things like &=) inside of conditionals
> always make my head hurt for some reason. So maybe something like the
> below?

The patch looks fine to me, note that nfsd_create_v3 needs fixing too.

>
> Thanks for the bug report! (And, by the way, how did you run across
> this?)
>

I'm working on an NFSp-like server for our clustered file system and my data
file creates were not working as expected.

--
Roger


-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that [email protected] is being discontinued.
Please subscribe to [email protected] instead.
http://vger.kernel.org/vger-lists.html#linux-nfs