[yp-tools] Do not check old passwords using passwd.adjunct feature

Honza Horak hhorak at fedoraproject.org
Mon Apr 23 12:39:42 UTC 2012


commit b8eaf289112eaa066fa81de21238749777a18855
Author: Honza HorĂ¡k <hhorak at redhat.com>
Date:   Mon Apr 23 14:39:21 2012 +0200

    Do not check old passwords using passwd.adjunct feature

 yp-tools-2.12-adjunct.patch |   12 ++++++++++++
 yp-tools.spec               |    3 +++
 2 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/yp-tools-2.12-adjunct.patch b/yp-tools-2.12-adjunct.patch
new file mode 100644
index 0000000..b1dd02d
--- /dev/null
+++ b/yp-tools-2.12-adjunct.patch
@@ -0,0 +1,12 @@
+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
+ 
+   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 */
+       && uid)
+     {
+       char *crypted = crypt(pwdstr, pwd->pw_passwd);
diff --git a/yp-tools.spec b/yp-tools.spec
index 063a5ce..de1c1e2 100644
--- a/yp-tools.spec
+++ b/yp-tools.spec
@@ -11,6 +11,7 @@ Patch1: yp-tools-2.12-typo.patch
 Patch2: yp-tools-2.12-gethost.patch
 Patch3: yp-tools-2.12-hash.patch
 Patch4: yp-tools-2.12-crypt.patch
+Patch5: yp-tools-2.12-adjunct.patch
 Url: http://www.linux-nis.org/nis/yp-tools/index.html
 Requires: ypbind
 
@@ -41,6 +42,7 @@ you'll need to install the ypserv package on one machine on the network.
 %patch2 -p1 -b .gethost
 %patch3 -p1 -b .hash
 %patch4 -p1 -b .crypt
+%patch5 -p1 -b .adjunct
 
 %build
 %configure --disable-domainname
@@ -63,6 +65,7 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install
 
 %changelog
 * Mon Apr 23 2012 Honza Horak <hhorak at redhat.com> - 2.12-9
+- Do not check old passwords using passwd.adjunct feature
 - Patch from Paul Wouters to handle crypt() returning NULL
   Resolves: #814803
 


More information about the scm-commits mailing list