From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x35.google.com (mail-oa1-x35.google.com [IPv6:2001:4860:4864:20::35]) by sourceware.org (Postfix) with ESMTPS id 807303856257 for ; Wed, 1 Jun 2022 17:40:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 807303856257 Received: by mail-oa1-x35.google.com with SMTP id 586e51a60fabf-e656032735so3711204fac.0 for ; Wed, 01 Jun 2022 10:40:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vePxusi2bS3+E4lWon49DQLaXP1taqZ0J9N5e7LNfz4=; b=oormGMtFKzh0x+8e/zx0/MFMM7UZxXtRY9YzS7rZRgUD8l39FJ0pz7qUDGr2HRlGqu mjeWZvLRqXm+/GvsuPO+3NanwfwYGz8Hnu26uH3Jt+z3+Hiq8j1rAcn2MCejKCuxWfwZ PwcaSmpD6l4cPGhx6sk90soQJsAq0/RYqV51xpZyxfHrwdcIabTh5ckYa3E2usenMv7r lMCDgJS8LxC80B8w2DN2SIU639bOMsb6093jJWzcKGh80+HnvEx2T466nBGEezFjkcp4 ggZCKHUAs5lA0mN9Ygo5wXY3wkKm+SrB5zwKaDL5CqxdFfXVhlP33RTT9NsoTFismrNy AKSQ== X-Gm-Message-State: AOAM533iiQ9hdBaEhxxHgjYdRAaHfteOLP/DqTkCwZc/CdzyrAZ8YcZR TGzzsDYCJptogmk5qvbwPWPqm96WOwc4xQ== X-Google-Smtp-Source: ABdhPJxuzW/xQgRQ82Bpy7Aosf3g4P9LobA/T1N7SmJManM4hPPiD/BCXflPRbjXdcCIlCx5/9fueg== X-Received: by 2002:a05:6870:ea8b:b0:f1:f46f:515e with SMTP id s11-20020a056870ea8b00b000f1f46f515emr376130oap.192.1654105211839; Wed, 01 Jun 2022 10:40:11 -0700 (PDT) Received: from birita.. ([2804:431:c7ca:e39c:a183:7f80:9e50:177b]) by smtp.gmail.com with ESMTPSA id l14-20020a0568301d6e00b0060ae954bf27sm1052578oti.62.2022.06.01.10.40.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 10:40:11 -0700 (PDT) From: Adhemerval Zanella To: libc-stable@sourceware.org Subject: [COMMITTED 2.35 2/8] misc: Use 64 bit stat for getusershell (BZ# 29204) Date: Wed, 1 Jun 2022 14:40:00 -0300 Message-Id: <20220601174006.219504-2-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220601174006.219504-1-adhemerval.zanella@linaro.org> References: <20220601174006.219504-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-stable@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-stable mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jun 2022 17:40:13 -0000 This is a missing spot initially from 52a5fe70a2c77935. Checked on i686-linux-gnu. (cherry picked from commit ec995fb2152f160f02bf695ff83c45df4a6cd868) --- NEWS | 1 + misc/getusershell.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index cbb3ac5827..ef700e0e2c 100644 --- a/NEWS +++ b/NEWS @@ -33,6 +33,7 @@ The following bugs are resolved with this release: [29109] libc: posix_spawn() always returns 1 (EPERM) on clone() failure [29203] libc: daemon is not y2038 aware + [29204] libc: getusershell is not 2038 aware Version 2.35 diff --git a/misc/getusershell.c b/misc/getusershell.c index 11f5aa83f8..4221095dca 100644 --- a/misc/getusershell.c +++ b/misc/getusershell.c @@ -97,7 +97,7 @@ initshells (void) { char **sp, *cp; FILE *fp; - struct stat64 statb; + struct __stat64_t64 statb; size_t flen; free(shells); @@ -106,7 +106,7 @@ initshells (void) strings = NULL; if ((fp = fopen(_PATH_SHELLS, "rce")) == NULL) goto init_okshells_noclose; - if (__fstat64(fileno(fp), &statb) == -1) { + if (__fstat64_time64(fileno(fp), &statb) == -1) { init_okshells: (void)fclose(fp); init_okshells_noclose: -- 2.34.1