git.annexia.org
/
libguestfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
270a26a
)
daemon: Allow utimens to work for directories (RHBZ#761451).
author
Richard W.M. Jones
<rjones@redhat.com>
Thu, 8 Dec 2011 11:15:18 +0000
(11:15 +0000)
committer
Richard W.M. Jones
<rjones@redhat.com>
Fri, 9 Dec 2011 15:35:32 +0000
(15:35 +0000)
You don't need to open the file O_WRONLY in order to call futimens on
the file descriptor. Opening it O_WRONLY fails for directories.
Therefore open O_RDONLY instead.
(cherry picked from commit
31fba8d8033216f8a288e75fe3f575b73b9ef925
)
daemon/utimens.c
patch
|
blob
|
history
diff --git
a/daemon/utimens.c
b/daemon/utimens.c
index
ae006c6
..
a9857db
100644
(file)
--- a/
daemon/utimens.c
+++ b/
daemon/utimens.c
@@
-37,7
+37,7
@@
do_utimens (const char *path,
int r;
CHROOT_IN;
- fd = open (path, O_
WR
ONLY | O_NOCTTY);
+ fd = open (path, O_
RD
ONLY | O_NOCTTY);
CHROOT_OUT;
if (fd == -1) {