From 496948587ee7842fb439bcc4f89982c5286cb688 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Oct 20 2022 20:12:54 +0000 Subject: import yp-tools-4.2.3-2.el8 --- diff --git a/SOURCES/yp-tools-4.2.3-yppasswd-exclamation_mark.patch b/SOURCES/yp-tools-4.2.3-yppasswd-exclamation_mark.patch new file mode 100644 index 0000000..43ca8fd --- /dev/null +++ b/SOURCES/yp-tools-4.2.3-yppasswd-exclamation_mark.patch @@ -0,0 +1,15 @@ +diff -ur yp-tools-4.2.3/src/yppasswd.c yp-tools-4.2.3/src/yppasswd.c +--- yp-tools-4.2.3/src/yppasswd.c 2018-03-27 15:47:48.000000000 +0200 ++++ yp-tools-4.2.3/src/yppasswd.c 2022-08-16 19:02:41.727441211 +0200 +@@ -689,6 +689,11 @@ + } + } + ++ if (strchr(pwd->pw_passwd, '!') != NULL || strchr(pwd->pw_passwd, '*') != NULL) { ++ printf("%s: The account is locked or has no password. Please unlock the account or set an initial password.\nPlease use 'passwd' or other tools that support this change. For more information, please check man pages 'passwd(5)' or 'shadow(5)'\n", progname); ++ return 1; ++ } ++ + /* Initialize password information */ + memset (&yppwd, '\0', sizeof (yppwd)); + yppwd.newpw.pw_passwd = pwd->pw_passwd; diff --git a/SPECS/yp-tools.spec b/SPECS/yp-tools.spec index ba87cf5..034f75f 100644 --- a/SPECS/yp-tools.spec +++ b/SPECS/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 4.2.3 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Base Source: https://github.com/thkukuk/yp-tools/archive/v%{version}.tar.gz @@ -9,6 +9,7 @@ Patch1: yp-tools-2.12-hash.patch Patch2: yp-tools-2.12-crypt.patch Patch3: yp-tools-2.12-adjunct.patch Patch4: yp-tools-4.2.2-strict-prototypes.patch +Patch5: yp-tools-4.2.3-yppasswd-exclamation_mark.patch Url: http://www.linux-nis.org/nis/yp-tools/index.html BuildRequires: autoconf, automake, gettext-devel, libtool, libtirpc-devel, libnsl2-devel Requires: ypbind >= 3:2.4-2 @@ -46,12 +47,7 @@ Install yp-tools-devel package for developing applications that use yp-tools %prep -%setup -q -n %{name}-%{version} -%patch1 -p1 -b .hash -%patch2 -p1 -b .crypt -%patch3 -p1 -b .adjunct -%patch4 -p1 -b .strict-prototypes - +%autosetup -n %{name}-%{version} -p1 autoreconf -i -f -v @@ -59,6 +55,7 @@ autoreconf -i -f -v export CFLAGS="$CFLAGS %{optflags} -Wno-cast-function-type" +# If needed the yppasswd can be deprecated by --enable-call-passwd %configure --disable-domainname %make_build @@ -79,6 +76,11 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Wed Aug 03 2022 Ondrej Sloup - 4.2.3-2 +- Fix /etc/passwd flags for locked and deactivated account +- Use autosetup + Resolves: 2093381 + * Thu Apr 19 2018 Petr Kubat - 4.2.3-1 - Update to version 4.2.3