From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BA21E158128 for ; Wed, 18 Jun 2025 02:58:00 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 9E92B341603 for ; Wed, 18 Jun 2025 02:58:00 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 883DC1104D9; Wed, 18 Jun 2025 02:57:59 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 7587D1104D9 for ; Wed, 18 Jun 2025 02:57:59 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 13B323415C9 for ; Wed, 18 Jun 2025 02:57:59 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id ACCE129EA for ; Wed, 18 Jun 2025 02:57:57 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1750215450.6c8f42e4b5218feb58c545dec9117386fcce195a.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/pam/files/, sys-libs/pam/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-libs/pam/files/pam-1.7.1-32-bit-lastlog.patch sys-libs/pam/files/pam-1.7.1-32-bit-timestamp.patch sys-libs/pam/pam-1.7.1.ebuild X-VCS-Directories: sys-libs/pam/files/ sys-libs/pam/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 6c8f42e4b5218feb58c545dec9117386fcce195a X-VCS-Branch: master Date: Wed, 18 Jun 2025 02:57:57 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 94375815-5b6b-43ce-b81b-c02b37755d26 X-Archives-Hash: 6f3ffe1dd8a4a46d6e525451e843bc06 commit: 6c8f42e4b5218feb58c545dec9117386fcce195a Author: Sam James gentoo org> AuthorDate: Wed Jun 18 02:57:30 2025 +0000 Commit: Sam James gentoo org> CommitDate: Wed Jun 18 02:57:30 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c8f42e4 sys-libs/pam: pull in 32-bit fixes for 1.7.1 Signed-off-by: Sam James gentoo.org> sys-libs/pam/files/pam-1.7.1-32-bit-lastlog.patch | 37 ++++++++++++++++++++++ .../pam/files/pam-1.7.1-32-bit-timestamp.patch | 37 ++++++++++++++++++++++ sys-libs/pam/pam-1.7.1.ebuild | 5 +++ 3 files changed, 79 insertions(+) diff --git a/sys-libs/pam/files/pam-1.7.1-32-bit-lastlog.patch b/sys-libs/pam/files/pam-1.7.1-32-bit-lastlog.patch new file mode 100644 index 000000000000..c27f9a6459a1 --- /dev/null +++ b/sys-libs/pam/files/pam-1.7.1-32-bit-lastlog.patch @@ -0,0 +1,37 @@ +https://github.com/linux-pam/linux-pam/commit/4176cf25a3ae8b5fd2956b41b068221b39932c3a + +From 4176cf25a3ae8b5fd2956b41b068221b39932c3a Mon Sep 17 00:00:00 2001 +From: "Dmitry V. Levin" +Date: Tue, 17 Jun 2025 13:00:00 +0000 +Subject: [PATCH] pam_lastlog: fix compilation warning on some of 32-bit + architectures + +On those of 32-bit architectures where glibc defines +__WORDSIZE_TIME64_COMPAT32, struct utmp.ut_tv.tv_sec is unsigned, +while time_t is signed, causing the following compiler diagnostics: + + pam_lastlog.c: In function 'last_login_failed': + pam_lastlog.c:572:29: warning: comparison of integer expressions of different signedness: '__uint32_t' {aka 'unsigned int'} and 'time_t' {aka 'long int'} [-Wsign-compare] + 572 | if (ut.ut_tv.tv_sec >= lltime && strncmp(ut.ut_user, user, UT_NAMESIZE) == 0) { + +Given that by its nature these values are treated as unsigned, fix this +by zero-extending both values to unsigned long long before the comparison. +--- + modules/pam_lastlog/pam_lastlog.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/modules/pam_lastlog/pam_lastlog.c b/modules/pam_lastlog/pam_lastlog.c +index 01545a696..c68b5fb04 100644 +--- a/modules/pam_lastlog/pam_lastlog.c ++++ b/modules/pam_lastlog/pam_lastlog.c +@@ -569,7 +569,8 @@ last_login_failed(pam_handle_t *pamh, int announce, const char *user, time_t llt + + while ((retval=pam_modutil_read(fd, (void *)&ut, + sizeof(ut))) == sizeof(ut)) { +- if (ut.ut_tv.tv_sec >= lltime && strncmp(ut.ut_user, user, UT_NAMESIZE) == 0) { ++ if (zero_extend_signed_to_ull(ut.ut_tv.tv_sec) >= zero_extend_signed_to_ull(lltime) ++ && strncmp(ut.ut_user, user, UT_NAMESIZE) == 0) { + memcpy(&utuser, &ut, sizeof(utuser)); + failed++; + } + diff --git a/sys-libs/pam/files/pam-1.7.1-32-bit-timestamp.patch b/sys-libs/pam/files/pam-1.7.1-32-bit-timestamp.patch new file mode 100644 index 000000000000..e0e12cc313db --- /dev/null +++ b/sys-libs/pam/files/pam-1.7.1-32-bit-timestamp.patch @@ -0,0 +1,37 @@ +https://github.com/linux-pam/linux-pam/commit/e3b66a60e4209e019cf6a45f521858cec2dbefa1 + +From e3b66a60e4209e019cf6a45f521858cec2dbefa1 Mon Sep 17 00:00:00 2001 +From: "Dmitry V. Levin" +Date: Tue, 17 Jun 2025 13:00:00 +0000 +Subject: [PATCH] pam_timestamp: fix compilation warning on some of 32-bit + architectures + +On those of 32-bit architectures where glibc defines +__WORDSIZE_TIME64_COMPAT32, struct utmp.ut_tv.tv_sec is unsigned, +while time_t is signed, causing the following compiler diagnostics: + + pam_timestamp.c: In function 'check_login_time': + pam_timestamp.c:247:55: warning: comparison of integer expressions of different signedness: 'time_t' {aka 'long int'} and '__uint32_t' {aka 'unsigned int'} [-Wsign-compare] + 247 | if (oldest_login == 0 || oldest_login > ut->ut_tv.tv_sec) { + +Given that by its nature these values are treated as unsigned, fix this +by zero-extending both values to unsigned long long before the comparison. +--- + modules/pam_timestamp/pam_timestamp.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/modules/pam_timestamp/pam_timestamp.c b/modules/pam_timestamp/pam_timestamp.c +index 0172d1ef9..030fa2b8f 100644 +--- a/modules/pam_timestamp/pam_timestamp.c ++++ b/modules/pam_timestamp/pam_timestamp.c +@@ -244,7 +244,9 @@ check_login_time( + if (strncmp(ruser, ut->ut_user, sizeof(ut->ut_user)) != 0) { + continue; + } +- if (oldest_login == 0 || oldest_login > ut->ut_tv.tv_sec) { ++ if (oldest_login == 0 || ++ zero_extend_signed_to_ull(oldest_login) ++ > zero_extend_signed_to_ull(ut->ut_tv.tv_sec)) { + oldest_login = ut->ut_tv.tv_sec; + } + } diff --git a/sys-libs/pam/pam-1.7.1.ebuild b/sys-libs/pam/pam-1.7.1.ebuild index eb03ad42934d..13ee4cbbf1de 100644 --- a/sys-libs/pam/pam-1.7.1.ebuild +++ b/sys-libs/pam/pam-1.7.1.ebuild @@ -66,6 +66,11 @@ DEPEND=" RDEPEND="${DEPEND}" PDEPEND=">=sys-auth/pambase-20200616" +PATCHES=( + "${FILESDIR}"/${P}-32-bit-lastlog.patch + "${FILESDIR}"/${P}-32-bit-timestamp.patch +) + src_configure() { # meson.build sets -Wl,--fatal-warnings and with e.g. mold, we get: # cannot assign version `global` to symbol `pam_sm_open_session`: symbol not found