Subject: Re: UNCHECKED mode and permission bits

From: Mike Eisler <[email-masked]>
Date: Fri, 19 Jan 2001 10:12:54 -0800 (PST)

>"Kendrick M. Smith" wrote:
>
>> > Looking at the Solaris NFS server code, or more correctly, the code for
>> > the create interface to the ufs filesystem, it does not appear that it
>> > implements to the NFSv2 and NFSv3 RFCs in this regard.  But I think the
>> > RFCs are wrong, as is the NFSv4 RFC. If I understand things correctly,
>> > in practice, only the size attribute in a non-exclusive CREATE gets
>> > applied to the existing file. Since the NFSv4 RFC will be
>> > replaced, it might be good to clarify this, since I doubt NFSv4 servers
>> > will comply with current RFC.
>>
>> doesn't the spec already say this?  from p. 144 of the draft7 spec,
>>
>> "When an UNCHECKED create encounters an existing file, the
>>  attributes specified by createattrs is not used, except that when
>>  an object_size of zero is specified, the existing file is
>>  truncated."

Indeed it does. Odd, I'd looked at that section in the
RFC and missed it before I delivered my rant.

Uresh Vahalia writes, in response to Kendrick M. Smith:

>That is different from Kendrick's statement and, I believe, from current
>practice in v2/v3.  If a non-zero file size is specified in an unchecked
>create for an existing file, I believe many of today's servers would truncate
>the file to the specified size.  YMMV.

Not all file systems will support truncation to arbitrary sizes
greather than zero. But I agreed that the NFSv4 language appears
to be unnecessarily restrictive in this regard, especially since
there is apaprently nothign special about an object size of zero when
doing exclusive OPENs.

Not that there are that many client implementations that create files
with non-zero sizes.

	-mre