From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x2a.google.com (mail-oa1-x2a.google.com [IPv6:2001:4860:4864:20::2a]) by sourceware.org (Postfix) with ESMTPS id 499C83856DD4 for ; Wed, 1 Jun 2022 17:00:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 499C83856DD4 Received: by mail-oa1-x2a.google.com with SMTP id 586e51a60fabf-f2cd424b9cso3503624fac.7 for ; Wed, 01 Jun 2022 10:00:34 -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=lB+wJPM6uK3WZcZKfioUT6f39ZJU1zzP7gcxEmWUzZU=; b=dQwhW64mU2IHTDPvM2vjX5sSExX9cKeT9TyoYczzdMEPMImzDFimw98n4bXoWCjFXP ByPQmpE7PmCW769Ms3HEssv6+EoT1/fnzHkvNve5iXb/fJZfLSNXSD+cKA7oxteRhuGf z+dfbglLX7O/RcLZKDj0hS8/wOR0V+UxoTA0zQML1PSJibK9lCjtNLt/9kyUTplL+xTA NagCmjkabOG3HRkMI3uqDFv6XZq0WG4G3/OkQJZxl1iIjsRCwlCVJ5jUZ14Syp/56Zl9 1q5fcKYweGwrMhuwBXACfNTybcfnpNkyec/Ws+oNaJMfwlcBmUxeEofzbNlFRbny2V3y 3h2g== X-Gm-Message-State: AOAM532OasrJRMPd8mmEXzrHscV/bv11QQVd2clbLtToK1snwAYmGt5A +/6t10Wm4PH9hAOxmhkSUHWDtaNyMV7CXQ== X-Google-Smtp-Source: ABdhPJwl9sxunawXolEa3gbSHMMYIIHRDFW4XUqTu8qSxmYZ2kcRufwHc+JefiVZlcUy3Gg9pRSdsA== X-Received: by 2002:a05:6870:9608:b0:f1:5a7b:92ea with SMTP id d8-20020a056870960800b000f15a7b92eamr240783oaq.175.1654102833452; Wed, 01 Jun 2022 10:00:33 -0700 (PDT) Received: from birita.. ([2804:431:c7ca:e39c:a183:7f80:9e50:177b]) by smtp.gmail.com with ESMTPSA id bh35-20020a056808182300b00325cda1ff95sm1257658oib.20.2022.06.01.10.00.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 10:00:33 -0700 (PDT) From: Adhemerval Zanella To: libc-stable@sourceware.org Subject: [COMMITTED 2.34 2/8] misc: Use 64 bit stat for getusershell (BZ# 29204) Date: Wed, 1 Jun 2022 14:00:22 -0300 Message-Id: <20220601170028.2638215-2-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220601170028.2638215-1-adhemerval.zanella@linaro.org> References: <20220601170028.2638215-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.2 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:00:36 -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 46e747a534..9fde64d55c 100644 --- a/NEWS +++ b/NEWS @@ -102,6 +102,7 @@ The following bugs are resolved with this release: [29097] time: fchmodat does not handle 64 bit time_t for AT_SYMLINK_NOFOLLOW [29203] libc: daemon is not y2038 aware + [29204] libc: getusershell is not 2038 aware Version 2.34 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