util-linux: update to 2.37.2.

This commit is contained in:
Đoàn Trần Công Danh 2021-08-22 21:53:42 +07:00 committed by Đoàn Trần Công Danh
parent 8f050e3ba1
commit e8cfd80c00
3 changed files with 3 additions and 76 deletions

View file

@ -1,47 +0,0 @@
From 3386b92e09e8a945cb071808e012e0b600f8bcb2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Tue, 27 Jul 2021 23:41:30 -0300
Subject: [PATCH 1/4] lib/pwdutils: don't use getlogin(3).
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Per the man page, it shouldn't be used for security purposes. This is an
issue especially on musl, where getlogin is implemented as
getenv("LOGNAME"). Since xgetlogin is being used as user identity in su(1), to
set PAM_RUSER, we simply switch to always using getpwuid(getuid()).
Signed-off-by: Érico Nogueira <erico.erc@gmail.com>
---
lib/pwdutils.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/lib/pwdutils.c b/lib/pwdutils.c
index d97020cb9..641a9da40 100644
--- a/lib/pwdutils.c
+++ b/lib/pwdutils.c
@@ -104,11 +104,6 @@ char *xgetlogin(void)
{
struct passwd *pw = NULL;
uid_t ruid;
- char *user;
-
- user = getlogin();
- if (user)
- return xstrdup(user);
/* GNU Hurd implementation has an extension where a process can exist in a
* non-conforming environment, and thus be outside the realms of POSIX
@@ -117,6 +112,9 @@ char *xgetlogin(void)
* environment.
*
* http://austingroupbugs.net/view.php?id=511
+ *
+ * The same implementation is useful for other systems, since getlogin(3)
+ * shouldn't be used as actual identification.
*/
errno = 0;
ruid = getuid();
--
2.32.0

View file

@ -1,26 +0,0 @@
From 3c466f7c353beb3076a2be8fb2931b9951430128 Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Thu, 29 Jul 2021 21:28:00 +0200
Subject: [PATCH 1/6] sulogin: fix getpasswd()
Fixes: https://github.com/karelzak/util-linux/issues/1400
Signed-off-by: Karel Zak <kzak@redhat.com>
---
login-utils/sulogin.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/login-utils/sulogin.c b/login-utils/sulogin.c
index 3016ef483..4d48943ad 100644
--- a/login-utils/sulogin.c
+++ b/login-utils/sulogin.c
@@ -621,6 +621,7 @@ static char *getpasswd(struct console *con)
cp = &con->cp;
tty = con->tio;
+ ret = pass;
tty.c_iflag &= ~(IUCLC|IXON|IXOFF|IXANY);
tty.c_lflag &= ~(ECHO|ECHOE|ECHOK|ECHONL|TOSTOP|ISIG);
tc = (tcsetattr(fd, TCSAFLUSH, &tty) == 0);
--
2.32.0

View file

@ -1,8 +1,8 @@
# Template file for 'util-linux'
# Keep this package sync with util-linux-common
pkgname=util-linux
version=2.37.1
revision=3
version=2.37.2
revision=1
build_style=gnu-configure
configure_args="--exec-prefix=\${prefix} --enable-libuuid --disable-makeinstall-chown
--enable-libblkid --enable-fsck --disable-rpath --enable-fs-paths-extra=/usr/sbin:/usr/bin
@ -22,7 +22,7 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://www.kernel.org/pub/linux/utils/util-linux/"
distfiles="${KERNEL_SITE}/utils/${pkgname}/v${version%.${version#*.*.}}/${pkgname}-${version}.tar.xz"
checksum=8e4bd42053b726cf86eb4d13a73bc1d9225a2c2e1a2e0d2a891f1020f83e6b76
checksum=6a0764c1aae7fb607ef8a6dd2c0f6c47d5e5fd27aa08820abaad9ec14e28e9d9
# Create uuidd system account for uuidd.
system_accounts="_uuidd"