Bug 10992 - futimens should reject AT_FDCWD
Summary: futimens should reject AT_FDCWD
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: 2.11
: P2 normal
Target Milestone: ---
Assignee: Ulrich Drepper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-20 16:08 UTC by Eric Blake
Modified: 2014-07-01 05:12 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Blake 2009-11-20 16:08:29 UTC
POSIX states that futimens shall fail if fd is not a valid file descriptor. 
AT_FDCWD, being negative, falls into this category.  But in the current code
base, futimens(AT_FDCWD,NULL) updates the timestamps of the current directory.

http://sourceware.org/ml/libc-alpha/2009-10/msg00017.html