import yp-tools-4.2.3-2.el8

This commit is contained in:
CentOS Sources 2023-03-28 13:33:27 +00:00 committed by Stepan Oksanichenko
parent ace47038a4
commit 597603838a
2 changed files with 24 additions and 7 deletions

View File

@ -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;

View File

@ -1,7 +1,7 @@
Summary: NIS (or YP) client programs Summary: NIS (or YP) client programs
Name: yp-tools Name: yp-tools
Version: 4.2.3 Version: 4.2.3
Release: 1%{?dist} Release: 2%{?dist}
License: GPLv2 License: GPLv2
Group: System Environment/Base Group: System Environment/Base
Source: https://github.com/thkukuk/yp-tools/archive/v%{version}.tar.gz 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 Patch2: yp-tools-2.12-crypt.patch
Patch3: yp-tools-2.12-adjunct.patch Patch3: yp-tools-2.12-adjunct.patch
Patch4: yp-tools-4.2.2-strict-prototypes.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 Url: http://www.linux-nis.org/nis/yp-tools/index.html
BuildRequires: autoconf, automake, gettext-devel, libtool, libtirpc-devel, libnsl2-devel BuildRequires: autoconf, automake, gettext-devel, libtool, libtirpc-devel, libnsl2-devel
Requires: ypbind >= 3:2.4-2 Requires: ypbind >= 3:2.4-2
@ -46,12 +47,7 @@ Install yp-tools-devel package for developing applications that use yp-tools
%prep %prep
%setup -q -n %{name}-%{version} %autosetup -n %{name}-%{version} -p1
%patch1 -p1 -b .hash
%patch2 -p1 -b .crypt
%patch3 -p1 -b .adjunct
%patch4 -p1 -b .strict-prototypes
autoreconf -i -f -v autoreconf -i -f -v
@ -59,6 +55,7 @@ autoreconf -i -f -v
export CFLAGS="$CFLAGS %{optflags} -Wno-cast-function-type" export CFLAGS="$CFLAGS %{optflags} -Wno-cast-function-type"
# If needed the yppasswd can be deprecated by --enable-call-passwd
%configure --disable-domainname %configure --disable-domainname
%make_build %make_build
@ -79,6 +76,11 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install
/var/yp/nicknames /var/yp/nicknames
%changelog %changelog
* Wed Aug 03 2022 Ondrej Sloup <osloup@redhat.com> - 4.2.3-2
- Fix /etc/passwd flags for locked and deactivated account
- Use autosetup
Resolves: 2093381
* Thu Apr 19 2018 Petr Kubat <pkubat@redhat.com> - 4.2.3-1 * Thu Apr 19 2018 Petr Kubat <pkubat@redhat.com> - 4.2.3-1
- Update to version 4.2.3 - Update to version 4.2.3