]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
inet: Use 64 bit stat for ruserpass (BZ# 29210)
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 31 May 2022 15:34:48 +0000 (12:34 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 1 Jun 2022 17:19:06 +0000 (14:19 -0300)
This is a missing spot initially from 52a5fe70a2c77935.

Checked on i686-linux-gnu.

(cherry picked from commit 3cd4785ea02cc3878bf21996cf9b61b3a306447e)

NEWS
inet/ruserpass.c

diff --git a/NEWS b/NEWS
index c943938656a0af496c440ee8068bddbfacedd7b8..5692715ef286c54680de653288ae23659fb881c7 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -37,6 +37,7 @@ The following bugs are resolved with this release:
   [29207] libc: posix_fallocate fallback implementation is not y2038
   [29208] libc: fpathconf(_PC_ASYNC_IO) is not y2038 aware
   [29209] libc: isfdtype is not y2038 aware
+  [29210] network: ruserpass is not y2038 aware
 
 \f
 Version 2.35
index d61a72877d20b7e52a6d5c9b6bbbeb9452fb4dc6..75e2a065524aa1d5d03ca2fec06a73b643c5a444 100644 (file)
@@ -95,7 +95,7 @@ ruserpass (const char *host, const char **aname, const char **apass)
        char *hdir, *buf, *tmp;
        char myname[1024], *mydomain;
        int t, usedefault = 0;
-       struct stat64 stb;
+       struct __stat64_t64 stb;
 
        hdir = __libc_secure_getenv("HOME");
        if (hdir == NULL) {
@@ -174,7 +174,7 @@ next:
                        break;
                case PASSWD:
                        if (strcmp(*aname, "anonymous") &&
-                           __fstat64(fileno(cfile), &stb) >= 0 &&
+                           __fstat64_time64(fileno(cfile), &stb) >= 0 &&
                            (stb.st_mode & 077) != 0) {
        warnx(_("Error: .netrc file is readable by others."));
        warnx(_("Remove 'password' line or make file unreadable by others."));