[PATCH] Better handle NULL utimes() in the NFS client
Bruce Evans
brde at optusnet.com.au
Thu Jan 17 02:31:33 UTC 2013
On Wed, 16 Jan 2013, Rick Macklem wrote:
> Bruce Evans wrote:
>> On Tue, 15 Jan 2013, Rick Macklem wrote:
>>
>>> Bruce Evans wrote:
>>
>>>> I can't see anything that does the different permissions check for
>>>> the VA_UTIMES_NULL case, and testing shows that this case is just
>>>> broken,
>>>> at least for an old version of the old nfs client -- the same
>>>> ...
>>> I did a quick test on a -current client/server and it seems to work
>>> ok.
>>> The client uses SET_TIME_TO_SERVER and the server sets
>>> VA_UTIMES_NULL
>>> for this case. At least it works for a UFS exported volume.
>>
>> It's not working for me with newnfs from 4 Mar 2012:
>> ...
> Well, I just ran essentially the same test, using the new client patched
> with jhb@'s patch and an up to date server and I got the same behaviour
> as when doing the touch locally on the file in the file system.
> - when not the file owner, but having write permissions
> touch <file> - worked for both local and NFS mount
> touch -r <other-file> <file> - failed with Operation not permitted for
> both local and NFS mount
>
> The test I had done before used a trivial program that just did a utimes(NULL)
> and it worked as non-owner with write access, as well.
>
> The server appears to have been patched for this at r157325 (Apr. 2006).
>
> Maybe your server hasn't been patched for this?
Indeed it hasn't -- it is missing setting of VA_UTIMES_NULL.
Bruce
More information about the freebsd-fs
mailing list