mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 04:06:22 +00:00
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>
This commit is contained in:
parent
9793c32667
commit
5b37696fda
1 changed files with 1 additions and 1 deletions
|
@ -106,7 +106,7 @@ long do_utimes(int dfd, char __user *filename, struct timespec *times, int flags
|
||||||
if (IS_IMMUTABLE(inode))
|
if (IS_IMMUTABLE(inode))
|
||||||
goto dput_and_out;
|
goto dput_and_out;
|
||||||
|
|
||||||
if (current->fsuid != inode->i_uid) {
|
if ((current->fsuid != inode->i_uid) && !capable(CAP_FOWNER)) {
|
||||||
if (f) {
|
if (f) {
|
||||||
if (!(f->f_mode & FMODE_WRITE))
|
if (!(f->f_mode & FMODE_WRITE))
|
||||||
goto dput_and_out;
|
goto dput_and_out;
|
||||||
|
|
Loading…
Reference in a new issue