utimens (fdutimens): ignore a negative FD, per contract
authorAurelien Jarno <aurelien@aurel32.net>
Wed, 6 Jan 2010 03:27:12 +0000 (20:27 -0700)
committerEric Blake <ebb9@byu.net>
Wed, 6 Jan 2010 03:27:12 +0000 (20:27 -0700)
commit41c44a66101c6c14b4e7f151247d517579760ba9
treeab2e2e871c55615edb0a70cd7a3b017a934f81f3
parentf8b8f4f5e1c1fd8687f4eeda7055aa89e30f65a5
utimens (fdutimens): ignore a negative FD, per contract

* lib/utimens.c (fdutimens) [HAVE_FUTIMENS]: Call futimens only
when we have a valid file descriptor.  Otherwise, using a brand
new glibc (with just-patched futimens that now fails with EBADF)
would cause this function to fail with ENOSYS.
Reported by Guillaume Ayoub in http://bugs.debian.org/563726.
See also http://bugzilla.redhat.com/552320.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
lib/utimens.c