projects
/
kernel
/
kernel-generic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9793c32
)
utime(s): Honour CAP_FOWNER when times==NULL
author
Satyam Sharma
<ssatyam@cse.iitk.ac.in>
Mon, 16 Jul 2007 18:54:23 +0000
(
00:24
+0530)
committer
Linus Torvalds
<torvalds@woody.linux-foundation.org>
Mon, 16 Jul 2007 19:14:08 +0000
(12:14 -0700)
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>
fs/utimes.c
patch
|
blob
|
history
diff --git
a/fs/utimes.c
b/fs/utimes.c
index
b3c8895
..
83a7e69
100644
(file)
--- 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;