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

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <mtk.manpages@...>
Cc: <miklos@...>, <drepper@...>, <viro@...>, <akpm@...>, <linux-kernel@...>, <linux-man@...>, <linux-fsdevel@...>
Date: Friday, May 30, 2008 - 3:22 pm

> >> Here's a further version of the patch, against 2.6.26rc2, with the

I understand your frustration, but actually I did say this the last
time as well:

  "Sorry, that was just an idea, but since it's not as simple as it
   should be, I guess we should leave that till later.  My main
   objection was against introducing more is_owner_or_cap() checks.
   Just doing the times == NULL case with ATTR_OWNER_CHECK should be
   fine."

Yeah, I may have been more explicit...


OK, you're right.  I've overlooked this point.

So as long as we believe that nobody is using the futime*() interfaces
in the way you described, which is highly probable, then we can fix
that as well.  Which is actually a nice thing, because it means the
permission checking for the times == NULL case can move from both
do_utimes_name() and do_futimes() into utimes_common().

So let's make two patches, and let's forget about the write_error
thing for now:

1)
  - turn UTIME_NOW/UTIME_NOW into times = NULL
  - for times != NULL set ATTR_OWNER_CHECK

2)
  - move times == NULL permission check into utimes_common.

For 2) you can just use permission() instead of vfs_permission() which
is exactly the same in this case (and consolidated into a common
function later in the vfs-cleanups tree).

OK?

Thanks,
Miklos
--
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)