Re: [PATCH] utimensat() non-conformances and fixes [v3]

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Al Viro <viro@...>
Cc: Miklos Szeredi <miklos@...>, <drepper@...>, <akpm@...>, <linux-kernel@...>, <linux-man@...>, <linux-fsdevel@...>
Date: Tuesday, June 3, 2008 - 7:27 am

On Tue, Jun 3, 2008 at 1:22 PM, Al Viro <viro@zeniv.linux.org.uk> wrote:

The standard is pretty clear on this point:

[[
Only a process with the effective user ID equal to the user ID of the
file, or with write access to the file, or with appropriate privileges
may use futimens( ) or utimensat( ) with a null pointer as the times
argument or with both tv_nsec fields set to the special value
UTIME_NOW.
]]

The crucial words here are "a process ... with write access to the
file" -- in other words, the permissions are determined by the
process's credentials, not by the access mode of the file descriptor.
I was not 100% sure on that to start with, so I did check it out with
one of the folk at The Open Group, to make sure of my understanding.

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Found a bug? http://www.kernel.org/doc/man-pages/reporting_bugs.html
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] utimensat() non-conformances and fixes -- version 2, Michael Kerrisk, (Fri May 16, 4:31 am)
[PATCH] utimensat() non-conformances and fixes [v3], Michael Kerrisk, (Fri May 30, 11:34 am)
Re: [PATCH] utimensat() non-conformances and fixes [v3], Michael Kerrisk, (Tue Jun 3, 7:05 am)
Re: [PATCH] utimensat() non-conformances and fixes [v3], Miklos Szeredi, (Tue Jun 3, 7:13 am)
Re: [PATCH] utimensat() non-conformances and fixes [v3], Michael Kerrisk, (Tue Jun 3, 7:52 am)
Re: [PATCH] utimensat() non-conformances and fixes [v3], Miklos Szeredi, (Tue Jun 3, 8:16 am)
Re: [PATCH] utimensat() non-conformances and fixes [v3], Michael Kerrisk, (Tue Jun 3, 7:27 am)
Re: [PATCH] utimensat() non-conformances and fixes [v3], Michael Kerrisk, (Tue Jun 3, 7:39 am)
Re: [PATCH] utimensat() non-conformances and fixes [v3], Miklos Szeredi, (Fri May 30, 12:37 pm)
Re: [PATCH] utimensat() non-conformances and fixes [v3], Michael Kerrisk, (Fri May 30, 2:24 pm)
Re: [PATCH] utimensat() non-conformances and fixes [v3], Andrew Morton, (Fri May 30, 4:17 pm)
Re: [PATCH] utimensat() non-conformances and fixes [v3], Michael Kerrisk, (Sat May 31, 1:44 am)
Re: [PATCH] utimensat() non-conformances and fixes [v3], Michael Kerrisk, (Fri May 30, 3:43 pm)
Re: [PATCH] utimensat() non-conformances and fixes [v3], Miklos Szeredi, (Fri May 30, 4:17 pm)
Re: [PATCH] utimensat() non-conformances and fixes [v3], Michael Kerrisk, (Sat May 31, 1:28 am)
Re: [PATCH] utimensat() non-conformances and fixes [v3], Miklos Szeredi, (Fri May 30, 3:22 pm)
Re: [PATCH] utimensat() non-conformances and fixes [v3], Matthew Wilcox, (Fri May 30, 3:32 pm)
Re: [PATCH] utimensat() non-conformances and fixes [v3], Miklos Szeredi, (Fri May 30, 4:08 pm)