login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
June
»
4
Re: [parch 2/4] vfs: utimensat(): be consistent with utime() for immutable and append-only files
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From:
Miklos Szeredi <miklos@...>
To: <mtk.manpages@...>
Cc: <akpm@...>, <linux-kernel@...>, <hch@...>, <miklos@...>, <viro@...>, <jamie@...>, <drepper@...>, <linux-fsdevel@...>, <subrata@...>
Subject:
Re: [parch 2/4] vfs: utimensat(): be consistent with utime() for immutable and append-only files
Date: Wednesday, June 4, 2008 - 12:29 am
> This patch fixes utimensat() to make its behavior consistent
quoted text
> with that of utime()/utimes() when dealing with files marked > immutable and append-only. > > The current utimensat() implementation also returns EPERM if > 'times' is non-NULL and the tv_nsec fields are both UTIME_NOW. > For consistency, the > > (times != NULL && times[0].tv_nsec == UTIME_NOW && > times[1].tv_nsec == UTIME_NOW) > > case should be treated like the traditional utimes() case where > 'times' is NULL. That is, the call should succeed for a file > marked append-only and should give the error EACCES if the file > is marked as immutable. > > The simple way to do this is to set 'times' to NULL > if (times[0].tv_nsec == UTIME_NOW && times[1].tv_nsec == UTIME_NOW). > > This is also the natural approach, since POSIX.1 semantics consider the > times == {{x, UTIME_NOW}, {y, UTIME_NOW}} > to be exactly equivalent to the case for > times == NULL. > > (Thanks to Miklos for pointing this out.) > > Patch 3 in this series relies on the simplification provided > by this patch. > > CC: Miklos Szeredi <miklos@szeredi.hu> > CC: Al Viro <viro@zeniv.linux.org.uk> > CC: Ulrich Drepper <drepper@redhat.com> > Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Miklos Szeredi <mszeredi@suse.cz> --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[parch 2/4] vfs: utimensat(): be consistent with utime() for...
, Michael Kerrisk
, (Tue Jun 3, 6:25 pm)
Re: [parch 2/4] vfs: utimensat(): be consistent with utime()...
, Miklos Szeredi
, (Wed Jun 4, 12:29 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Sunil Naidu
Re: Linux 2.6.20-rc6
Alan Cox
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Chris Snook
Re: init's children list is long and slows reaping children.
Greg Kroah-Hartman
[PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO
git
:
openbsd-misc
:
linux-netdev
:
Jarek Poplawski
[PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
David Miller
[GIT]: Networking
Gerrit Renker
[PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side)
Eric W. Biederman
Re: [PATCH 10/11] avoid kobject name conflict with different namespaces
Colocation donated by:
Who's online
There are currently
1 user
and
899 guests
online.
Online users
strcmp
Syndicate