lkml.org 
[lkml]   [2008]   [Jun]   [4]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [parch 3/4] vfs: utimensat(): fix error checking for {UTIME_NOW,UTIME_OMIT} case
FromMiklos Szeredi <>
DateWed, 04 Jun 2008 06:54:58 +0200
> > +	} else if ((times[0].tv_nsec == UTIME_NOW &&
> > +		    times[1].tv_nsec == UTIME_OMIT)
> > +		  ||
> > +		   (times[0].tv_nsec == UTIME_OMIT &&
> > +		    times[1].tv_nsec == UTIME_NOW)) {
> 

> +
> +		if (!is_owner_or_cap(inode))
> +			goto mnt_drop_write_and_out;

And in fact a little comment wouldn't hurt explaining what exactly is
going on here with the permission checking.

The "/* Don't worry, the checks are done in inode_change_ok() */" is
really reassuring, but unfortunately not exactly the truth (and never
was).
Miklos



\
 
 \ /
  Last update: 2008-06-04 07:27    [from the cache]
©2003-2008