mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
linux: Fix fchmodat with AT_SYMLINK_NOFOLLOW for 64 bit time_t (BZ#29097)
The AT_SYMLINK_NOFOLLOW emulation ues the default 32 bit stat internal calls, which fails with EOVERFLOW if the file constains timestamps beyond 2038. Checked on i686-linux-gnu.
This commit is contained in:
@@ -48,8 +48,8 @@ fchmodat (int fd, const char *file, mode_t mode, int flag)
|
||||
|
||||
/* Use fstatat because fstat does not work on O_PATH descriptors
|
||||
before Linux 3.6. */
|
||||
struct stat64 st;
|
||||
if (__fstatat64 (pathfd, "", &st, AT_EMPTY_PATH) != 0)
|
||||
struct __stat64_t64 st;
|
||||
if (__fstatat64_time64 (pathfd, "", &st, AT_EMPTY_PATH) != 0)
|
||||
{
|
||||
__close_nocancel (pathfd);
|
||||
return -1;
|
||||
|
Reference in New Issue
Block a user