daemon: Allow utimens to work for directories (RHBZ#761451).
authorRichard W.M. Jones <rjones@redhat.com>
Thu, 8 Dec 2011 11:15:18 +0000 (11:15 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Fri, 9 Dec 2011 15:35:32 +0000 (15:35 +0000)
commit289645e80aebef0378ce69db5b0e847e8d6a28c6
treea0e1efadbb1d10cfe05ddf95fdf5bd7e77f7a0d4
parent270a26a3d24a6dd0b5553b66490979beb5d04ffc
daemon: Allow utimens to work for directories (RHBZ#761451).

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