diff --git a/SOURCES/yp-tools-2.12-adjunct.patch b/SOURCES/yp-tools-2.12-adjunct.patch index b1dd02d..ffddb12 100644 --- a/SOURCES/yp-tools-2.12-adjunct.patch +++ b/SOURCES/yp-tools-2.12-adjunct.patch @@ -1,12 +1,18 @@ -diff -up yp-tools-2.12/src/yppasswd.c.adjunct yp-tools-2.12/src/yppasswd.c ---- yp-tools-2.12/src/yppasswd.c.adjunct 2012-04-23 13:17:47.000988833 +0200 -+++ yp-tools-2.12/src/yppasswd.c 2012-04-23 13:18:01.209802938 +0200 -@@ -449,7 +449,7 @@ verifypassword (struct passwd *pwd, char - +--- yp-tools-2.14/src/yppasswd.c.adjunct 2017-01-04 08:40:17.081225336 +0100 ++++ yp-tools-2.14/src/yppasswd.c 2017-01-04 08:41:01.214077346 +0100 +@@ -450,6 +450,7 @@ passwdlen = get_passwd_len (pwd->pw_passwd); if (pwd->pw_passwd[0] -- && 0 != strcmp (pwd->pw_passwd, "x") /* don't check shadow passwords */ -+ && 0 != strcmp (pwd->pw_passwd, "##") /* don't check passwords using passwd.adjunct feature */ + && 0 != strcmp (pwd->pw_passwd, "x") /* don't check shadow passwords */ ++ && 0 != strncmp (pwd->pw_passwd, "##", 2) /* don't check passwords using passwd.adjunct feature */ && uid) { char *crypted = crypt(pwdstr, pwd->pw_passwd); +@@ -774,6 +775,7 @@ + /* We can't check the password with shadow passwords enabled. We + * leave the checking to yppasswdd */ + if (uid != 0 && strcmp (pwd->pw_passwd, "x") != 0 && ++ 0 != strncmp (pwd->pw_passwd, "##", 2) && /* don't check passwords using passwd.adjunct feature */ + strcmp (pwd->pw_passwd, hashpass ) != 0) + { + int passwdlen = get_passwd_len (pwd->pw_passwd); diff --git a/SPECS/yp-tools.spec b/SPECS/yp-tools.spec index b84ea46..39eafd1 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: 2.14 -Release: 3%{?dist} +Release: 5%{?dist} License: GPLv2 Group: System Environment/Base Source: http://www.linux-nis.org/download/yp-tools/yp-tools-%{version}.tar.bz2 @@ -60,6 +60,12 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Mon Jun 05 2017 Petr Kubat - 2.14-5 +- Properly fix adjunct check in yppasswd (#1401432) + +* Tue Jan 17 2017 Petr Kubat - 2.14-4 +- Fix adjunct and shadow password checks in yppasswd (#1401432) + * Fri Jan 24 2014 Daniel Mach - 2.14-3 - Mass rebuild 2014-01-24