Commit 5b37696fda07b8acf37beba3853f83106397ccdf

Authored by Satyam Sharma
Committed by Linus Torvalds
1 parent 9793c32667

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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -106,7 +106,7 @@
106 106 if (IS_IMMUTABLE(inode))
107 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 110 if (f) {
111 111 if (!(f->f_mode & FMODE_WRITE))
112 112 goto dput_and_out;