From owner-freebsd-fs@FreeBSD.ORG Thu Jan 17 02:31:33 2013 Return-Path: Delivered-To: fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 6F0DCAA1; Thu, 17 Jan 2013 02:31:33 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail10.syd.optusnet.com.au (mail10.syd.optusnet.com.au [211.29.132.191]) by mx1.freebsd.org (Postfix) with ESMTP id 0F01D182; Thu, 17 Jan 2013 02:31:32 +0000 (UTC) Received: from c211-30-173-106.carlnfd1.nsw.optusnet.com.au (c211-30-173-106.carlnfd1.nsw.optusnet.com.au [211.30.173.106]) by mail10.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id r0H2VR97023518 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 17 Jan 2013 13:31:30 +1100 Date: Thu, 17 Jan 2013 13:31:26 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Rick Macklem Subject: Re: [PATCH] Better handle NULL utimes() in the NFS client In-Reply-To: <1642392672.2036529.1358346406018.JavaMail.root@erie.cs.uoguelph.ca> Message-ID: <20130117132903.O1225@besplex.bde.org> References: <1642392672.2036529.1358346406018.JavaMail.root@erie.cs.uoguelph.ca> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.0 cv=R7tbgqtX c=1 sm=1 a=S8Qr1IbAvFsA:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=U1Z5fgpPGSMA:10 a=-VJYlQ4Kf0PCPYjB1mIA:9 a=CjuIK1q_8ugA:10 a=TEtd8y5WR3g2ypngnwZWYw==:117 Cc: Rick Macklem , fs@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2013 02:31:33 -0000 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 - worked for both local and NFS mount > touch -r - 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