diff options
author | Satyam Sharma <ssatyam@cse.iitk.ac.in> | 2007-07-16 20:54:23 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-16 21:14:08 +0200 |
commit | 5b37696fda07b8acf37beba3853f83106397ccdf (patch) | |
tree | 5f85c318eb7d76ce05adf504c4e209978a70ad47 /fs | |
parent | Fix too few arguments to function `scsi_cmd_ioctl' (diff) | |
download | linux-5b37696fda07b8acf37beba3853f83106397ccdf.tar.xz linux-5b37696fda07b8acf37beba3853f83106397ccdf.zip |
utime(s): Honour CAP_FOWNER when times==NULL
do_utimes() does not honour CAP_FOWNER when times==NULL.
Trivial and obvious one-line fix.
Signed-off-by: Satyam Sharma <ssatyam@cse.iitk.ac.in>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/utimes.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/utimes.c b/fs/utimes.c index b3c88952465f..83a7e69e706c 100644 --- a/fs/utimes.c +++ b/fs/utimes.c @@ -106,7 +106,7 @@ long do_utimes(int dfd, char __user *filename, struct timespec *times, int flags if (IS_IMMUTABLE(inode)) goto dput_and_out; - if (current->fsuid != inode->i_uid) { + if ((current->fsuid != inode->i_uid) && !capable(CAP_FOWNER)) { if (f) { if (!(f->f_mode & FMODE_WRITE)) goto dput_and_out; |