diff options
author | Satyam Sharma <ssatyam@cse.iitk.ac.in> | 2007-07-16 14:54:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-16 15:14:08 -0400 |
commit | 5b37696fda07b8acf37beba3853f83106397ccdf (patch) | |
tree | 5f85c318eb7d76ce05adf504c4e209978a70ad47 /fs | |
parent | 9793c3266755b4cae8915982825b2c07cd12e1c6 (diff) |
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 | |||
106 | if (IS_IMMUTABLE(inode)) | 106 | if (IS_IMMUTABLE(inode)) |
107 | goto dput_and_out; | 107 | goto dput_and_out; |
108 | 108 | ||
109 | if (current->fsuid != inode->i_uid) { | 109 | if ((current->fsuid != inode->i_uid) && !capable(CAP_FOWNER)) { |
110 | if (f) { | 110 | if (f) { |
111 | if (!(f->f_mode & FMODE_WRITE)) | 111 | if (!(f->f_mode & FMODE_WRITE)) |
112 | goto dput_and_out; | 112 | goto dput_and_out; |