Email List: Xaustin-group-lX
[All Lists]

Re: Bug in XSHd5 futimens

To: Geoff Clare <gwc@xxxxxxxxxxxxx>
Subject: Re: Bug in XSHd5 futimens
From: Michael Kerrisk <mtk.lists@xxxxxxxxx>
Date: Thu, 15 May 2008 11:48:34 +0200
Cc: austin-group-l@xxxxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; bh=KyPUQSI2AnNuZx3pbGhg4cfPUNnspF+YbOpY2uip+nI=; b=lwKBXnOy62n/Hn8ZBViMnWE9DgcYcOHr77cQCtRuB2U/P3zeP2EvMgbmvgD1xxIUmG8tvI4eCiTRHWnG788AH3PStUocl872rWl9NL4IS7l1J8Obmk9mUYSl56C6/nCuk9uwuuNuzV0IzuIZPaiZev2CbQQTcX7Y8+veC1npAEE=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=uMahWetSXOiG2/8n1V22xO+lHgBtaFpGa9+m0Yzt4FCvyCojecMq2G9ORbmf9+6qc/YqZVugRr7OGqUVwnV67yC67E2uvkwBU+rVk9Pj4o4QIgEneSc1jQfBJrs/1aKGaAx+yqNf/Ck7DFR1PKM0Nczs14KGXOOQT8ThF10KEq8=
References: <200805142143.WAA17994@xoneweb.opengroup.org> <20080515092607.GA21034@squonk.masqnet>
Geoff Clare wrote:
Michael Kerrisk <michael.kerrisk@gmail.com> wrote, on 14 May 2008:
@ page 969 line 32433 section futimens comment {utimensat-errs}

[snip]
Lines 32400-32403 of the draft say :

    Only a process with the effective user ID equal to the user ID
    of the file or with appropriate privileges may use futimens() or
    utimensat() with a non-null times argument that does not have both
    tv_nsec fields set to UTIME_NOW and does not have both tv_nsec
    fields set to UTIME_OMIT.

Looking at these lines suggests that the text for the EPERM error
should remove discussion of write access to the file, since the error
applies regardless of whether the file is writable.

Action:

Replace lines 32431 to 32435 with the following:

[EPERM] The times argument is not a null pointer, does not have both
tv_nsec fields set to UTIME_NOW, does not have both tv_nsec fields
set to UTIME_OMIT, the calling process' effective user ID does not
match the owner of the file, and the calling process does not have
appropriate privileges.
I agree that this change is needed. Since draft 5.1 has already been
produced, I suggest that we should take this as an aardvark against 5.1
(the page and line numbers are the same), to be addressed in TC1.
Do I need to do anything to get that Aardvark moved to the TC1 queue?

In passing, does anyone know what the rationale was for having two different permission errors (EACCES and EPERM) for utime() and utimes() (and thus now utimesat() and futimens())? Was this just standardization of existing practice, or is there another reason?

<Prev in Thread] Current Thread [Next in Thread>