summaryrefslogtreecommitdiffstats
path: root/fs/utimes.c
diff options
context:
space:
mode:
authorSatyam Sharma <ssatyam@cse.iitk.ac.in>2007-07-17 00:24:23 +0530
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-16 12:14:08 -0700
commit5b37696fda07b8acf37beba3853f83106397ccdf (patch)
tree5f85c318eb7d76ce05adf504c4e209978a70ad47 /fs/utimes.c
parent9793c3266755b4cae8915982825b2c07cd12e1c6 (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/utimes.c')
-rw-r--r--fs/utimes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/utimes.c b/fs/utimes.c
index b3c88952465..83a7e69e706 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;