From e8cfd80c00ec8af6d74ff0b0ad983211f6597dee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Sun, 22 Aug 2021 21:53:42 +0700 Subject: [PATCH] util-linux: update to 2.37.2. --- ...01-lib-pwdutils-don-t-use-getlogin-3.patch | 47 ------------------- .../patches/0001-sulogin-fix-getpasswd.patch | 26 ---------- srcpkgs/util-linux/template | 6 +-- 3 files changed, 3 insertions(+), 76 deletions(-) delete mode 100644 srcpkgs/util-linux/patches/0001-lib-pwdutils-don-t-use-getlogin-3.patch delete mode 100644 srcpkgs/util-linux/patches/0001-sulogin-fix-getpasswd.patch diff --git a/srcpkgs/util-linux/patches/0001-lib-pwdutils-don-t-use-getlogin-3.patch b/srcpkgs/util-linux/patches/0001-lib-pwdutils-don-t-use-getlogin-3.patch deleted file mode 100644 index facf97c667..0000000000 --- a/srcpkgs/util-linux/patches/0001-lib-pwdutils-don-t-use-getlogin-3.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 3386b92e09e8a945cb071808e012e0b600f8bcb2 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?=C3=89rico=20Nogueira?= -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 ---- - 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 - diff --git a/srcpkgs/util-linux/patches/0001-sulogin-fix-getpasswd.patch b/srcpkgs/util-linux/patches/0001-sulogin-fix-getpasswd.patch deleted file mode 100644 index d9dba317a5..0000000000 --- a/srcpkgs/util-linux/patches/0001-sulogin-fix-getpasswd.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 3c466f7c353beb3076a2be8fb2931b9951430128 Mon Sep 17 00:00:00 2001 -From: Karel Zak -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 ---- - 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 - diff --git a/srcpkgs/util-linux/template b/srcpkgs/util-linux/template index 37fca0298c..8e622ca3cd 100644 --- a/srcpkgs/util-linux/template +++ b/srcpkgs/util-linux/template @@ -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 " 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"