Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Jan 2013 13:31:26 +1100 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Rick Macklem <rmacklem@uoguelph.ca>
Cc:        Rick Macklem <rmacklem@freebsd.org>, fs@freebsd.org
Subject:   Re: [PATCH] Better handle NULL utimes() in the NFS client
Message-ID:  <20130117132903.O1225@besplex.bde.org>
In-Reply-To: <1642392672.2036529.1358346406018.JavaMail.root@erie.cs.uoguelph.ca>
References:  <1642392672.2036529.1358346406018.JavaMail.root@erie.cs.uoguelph.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130117132903.O1225>