From 746e1b769778c4e4f10260c050ee93e2cafdfbcc Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 25 Feb 2009 18:15:51 +0000 Subject: [PATCH 01/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild --- yp-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index aff31c6..bda8457 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs. Name: yp-tools Version: 2.9 -Release: 4 +Release: 5 License: GPLv2 Group: System Environment/Base Source: ftp://ftp.kernel.org/pub/linux/utils/net/NIS/yp-tools-%{version}.tar.bz2 @@ -59,6 +59,9 @@ rm -rf $RPM_BUILD_ROOT %dir /var/yp %changelog +* Wed Feb 25 2009 Fedora Release Engineering - 2.9-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + * Mon Aug 11 2008 Jason L Tibbitts III - 2.9-4 - Fix license tag. From 15b18ebb360d74420518640c9f337449e16ec4e1 Mon Sep 17 00:00:00 2001 From: vcrhonek Date: Wed, 4 Mar 2009 12:52:24 +0000 Subject: [PATCH 02/71] Add SHA-2 password hashes support --- yp-tools-2.9-sha-2.patch | 130 +++++++++++++++++++++++++++++++++++++++ yp-tools.spec | 8 ++- 2 files changed, 137 insertions(+), 1 deletion(-) create mode 100644 yp-tools-2.9-sha-2.patch diff --git a/yp-tools-2.9-sha-2.patch b/yp-tools-2.9-sha-2.patch new file mode 100644 index 0000000..1b81eed --- /dev/null +++ b/yp-tools-2.9-sha-2.patch @@ -0,0 +1,130 @@ +diff -up yp-tools-2.9/src/yppasswd.c_old yp-tools-2.9/src/yppasswd.c +--- yp-tools-2.9/src/yppasswd.c_old 2009-03-03 15:23:49.000000000 +0100 ++++ yp-tools-2.9/src/yppasswd.c 2009-03-04 12:39:34.000000000 +0100 +@@ -475,7 +475,8 @@ main (int argc, char **argv) + { + char *s, *progname, *domainname = NULL, *user = NULL, *master = NULL; + int f_flag = 0, l_flag = 0, p_flag = 0, error, status; +- int has_md5_passwd = 0; ++ int hash_id = DES; ++ char rounds[11] = "\0"; /* max length is '999999999$' */ + struct yppasswd yppwd; + struct passwd *pwd; + CLIENT *clnt; +@@ -680,7 +681,18 @@ main (int argc, char **argv) + strcpy (cp, pwd->pw_name); + + if (strncmp(pwd->pw_passwd, "$1$", 3) == 0) +- has_md5_passwd = 1; ++ hash_id = MD5; ++ ++ if (strncmp(pwd->pw_passwd, "$5$", 3) == 0) ++ hash_id = SHA_256; ++ ++ if (strncmp(pwd->pw_passwd, "$6$", 3) == 0) ++ hash_id = SHA_512; ++ ++ /* Preserve 'rounds=$' (if present) in case of SHA-2 */ ++ if (hash_id == SHA_256 || hash_id == SHA_512) ++ if (strncmp(pwd->pw_passwd + 3, "rounds=", 7) == 0) ++ strncpy(rounds, pwd->pw_passwd + 10, strcspn(pwd->pw_passwd + 10, "$") + 1); + + /* We can't check the password with shadow passwords enabled. We + * leave the checking to yppasswdd */ +@@ -693,15 +705,23 @@ main (int argc, char **argv) + /* Some systems (HPU/X) store the password aging info after + * the password (with a comma to separate it). To support + * this we cut the password after the first invalid char +- * after the normal 13 ones. We can't cut at the first +- * invalid char, since MD5 uses $ in the first char. ++ * after the normal 13 ones - in case of MD5 (and DES). ++ * We can't cut at the first invalid char, since MD5 ++ * uses $ in the first char. In case of SHA-2 we are looking ++ * for first invalid char after the 38 ones. + */ +- if (passwdlen > 13) +- passwdlen = 13 + strspn(pwd->pw_passwd + 13, ++ if (passwdlen > 13 && (hash_id == DES || hash_id == MD5)) ++ passwdlen = 13 + strspn(pwd->pw_passwd + 13, + "abcdefghijklmnopqrstuvwxyz" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "0123456789./"); + ++ if (passwdlen > 38 && (hash_id == SHA_256 || hash_id == SHA_512)) ++ passwdlen = 38 + strspn(pwd->pw_passwd + 38, ++ "abcdefghijklmnopqrstuvwxyz" ++ "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ++ "0123456789./"); ++ + sane_passwd = alloca (passwdlen + 1); + strncpy (sane_passwd, pwd->pw_passwd, passwdlen); + sane_passwd[passwdlen] = 0; +@@ -719,7 +739,7 @@ main (int argc, char **argv) + #ifdef USE_CRACKLIB + char *error_msg; + #endif /* USE_CRACKLIB */ +- char *buf, salt[12], *p = NULL; ++ char *buf, salt[37], *p = NULL; + int tries = 0; + + buf = (char *) malloc (129); +@@ -771,15 +791,37 @@ main (int argc, char **argv) + } + } + +- if (!has_md5_passwd) +- create_random_salt (salt, 2); +- else +- { +- /* The user already had a MD5 password, so it's safe to +- * use a MD5 password again */ +- strcpy (salt, "$1$"); +- create_random_salt (salt+3, 8); +- } ++ switch (hash_id) ++ { ++ case DES: ++ create_random_salt (salt, 2); ++ break; ++ ++ case MD5: ++ /* The user already had a MD5 password, so it's safe to ++ * use a MD5 password again */ ++ strcpy (salt, "$1$"); ++ create_random_salt (salt+3, 8); ++ break; ++ ++ case SHA_256: ++ case SHA_512: ++ /* The user already had a SHA-2 password, so it's safe to ++ * use a SHA-2 password again */ ++ snprintf(salt, 4, "$%d$", hash_id); ++ if (strlen(rounds) != 0) ++ { ++ strcpy (salt+3, "rounds="); ++ strcpy (salt+3+7, rounds); ++ create_random_salt (salt+3+7+strlen(rounds), 16); ++ } ++ else ++ create_random_salt (salt+3, 16); ++ ++ break; ++ default: ++ break; ++ } + + yppwd.newpw.pw_passwd = strdup (crypt (buf, salt)); + } +diff -up yp-tools-2.9/src/yppasswd.h_old yp-tools-2.9/src/yppasswd.h +--- yp-tools-2.9/src/yppasswd.h_old 2009-03-04 10:49:41.000000000 +0100 ++++ yp-tools-2.9/src/yppasswd.h 2009-03-04 11:16:41.000000000 +0100 +@@ -46,4 +46,9 @@ typedef struct yppasswd yppasswd; + extern bool_t xdr_xpasswd (XDR *, xpasswd*); + extern bool_t xdr_yppasswd (XDR *, yppasswd*); + ++#define DES 0 ++#define MD5 1 ++#define SHA_256 5 ++#define SHA_512 6 ++ + #endif /* !__YPPASSWD_H__ */ diff --git a/yp-tools.spec b/yp-tools.spec index bda8457..c715359 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,12 +1,13 @@ Summary: NIS (or YP) client programs. Name: yp-tools Version: 2.9 -Release: 5 +Release: 6%{?dist} License: GPLv2 Group: System Environment/Base Source: ftp://ftp.kernel.org/pub/linux/utils/net/NIS/yp-tools-%{version}.tar.bz2 Url: http://www.linux-nis.org/nis/yp-tools/index.html Patch1: yp-tools-2.7-md5.patch +Patch2: yp-tools-2.9-sha-2.patch Obsoletes: yppasswd, yp-clients Requires: ypbind Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -34,6 +35,7 @@ you'll need to install the ypserv package on one machine on the network. %prep %setup -q %patch1 -p1 -b .md5 +%patch2 -p1 -b .sha-2 %build %configure --disable-domainname @@ -59,6 +61,10 @@ rm -rf $RPM_BUILD_ROOT %dir /var/yp %changelog +* Wed Mar 4 2009 Vitezslav Crhonek - 2.9-6 +- Add SHA-2 password hashes support + Resolves: #487607 + * Wed Feb 25 2009 Fedora Release Engineering - 2.9-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild From 7b97cd07f2ba143a62ccdfa214cb33c652a5224a Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Mon, 27 Jul 2009 08:55:27 +0000 Subject: [PATCH 03/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild --- yp-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index c715359..a5e35ae 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs. Name: yp-tools Version: 2.9 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2 Group: System Environment/Base Source: ftp://ftp.kernel.org/pub/linux/utils/net/NIS/yp-tools-%{version}.tar.bz2 @@ -61,6 +61,9 @@ rm -rf $RPM_BUILD_ROOT %dir /var/yp %changelog +* Mon Jul 27 2009 Fedora Release Engineering - 2.9-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + * Wed Mar 4 2009 Vitezslav Crhonek - 2.9-6 - Add SHA-2 password hashes support Resolves: #487607 From 10a5216e73f8c9f0461be6012a37b22aa38f0e00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Mon, 10 Aug 2009 10:16:49 +0000 Subject: [PATCH 04/71] - Convert specfile to UTF-8. --- yp-tools.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/yp-tools.spec b/yp-tools.spec index a5e35ae..7ac0974 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs. Name: yp-tools Version: 2.9 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2 Group: System Environment/Base Source: ftp://ftp.kernel.org/pub/linux/utils/net/NIS/yp-tools-%{version}.tar.bz2 @@ -61,6 +61,9 @@ rm -rf $RPM_BUILD_ROOT %dir /var/yp %changelog +* Mon Aug 10 2009 Ville Skyttä - 2.9-8 +- Convert specfile to UTF-8. + * Mon Jul 27 2009 Fedora Release Engineering - 2.9-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild @@ -144,7 +147,7 @@ rm -rf $RPM_BUILD_ROOT * Sun Jun 24 2001 Elliot Lee - Bump release + rebuild. -* Mon Feb 26 2001 Trond Eivind Glomsrød +* Mon Feb 26 2001 Trond Eivind Glomsrød - langify * Wed Sep 27 2000 Florian La Roche From ead9eea40208ad4bb80b2240f8b8b5c553d51235 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 25 Nov 2009 22:39:36 +0000 Subject: [PATCH 05/71] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3fbd49f..ec5e41f 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: yp-tools -# $Id: Makefile,v 1.1 2004/09/09 15:10:06 cvsdist Exp $ +# $Id: Makefile,v 1.2 2007/10/15 19:38:34 notting Exp $ NAME := yp-tools SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From ba62c391b2aaa7c67d37c5c1e291ea80507d30de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Kl=C3=AD=C4=8D?= Date: Thu, 10 Dec 2009 15:13:14 +0000 Subject: [PATCH 06/71] Update to newer version --- .cvsignore | 2 +- sources | 2 +- yp-tools.spec | 13 ++++++++----- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.cvsignore b/.cvsignore index 2c5e4ea..9b2d11c 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -yp-tools-2.9.tar.bz2 +yp-tools-2.10.tar.bz2 diff --git a/sources b/sources index f7ca57c..c66c8c3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -19de06a04129ec26773f9198e086fcd4 yp-tools-2.9.tar.bz2 +c1bc7ea2339c766d8e6dffd3f5f2e8e1 yp-tools-2.10.tar.bz2 diff --git a/yp-tools.spec b/yp-tools.spec index 7ac0974..49de8d8 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,14 +1,13 @@ -Summary: NIS (or YP) client programs. +Summary: NIS (or YP) client programs Name: yp-tools -Version: 2.9 -Release: 8%{?dist} +Version: 2.10 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Base Source: ftp://ftp.kernel.org/pub/linux/utils/net/NIS/yp-tools-%{version}.tar.bz2 Url: http://www.linux-nis.org/nis/yp-tools/index.html Patch1: yp-tools-2.7-md5.patch Patch2: yp-tools-2.9-sha-2.patch -Obsoletes: yppasswd, yp-clients Requires: ypbind Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -51,7 +50,7 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install rm -rf $RPM_BUILD_ROOT %files -f %{name}.lang -%defattr(-,root,root) +%defattr(-,root,root,-) %doc AUTHORS COPYING README ChangeLog NEWS etc/nsswitch.conf %doc THANKS TODO /usr/bin/* @@ -61,6 +60,10 @@ rm -rf $RPM_BUILD_ROOT %dir /var/yp %changelog +* Thu Dec 10 2009 Karel Klic - 2.10-1 +- Updated to new version +- Removed unnecessary obsoletes + * Mon Aug 10 2009 Ville Skyttä - 2.9-8 - Convert specfile to UTF-8. From c4a077df2ac2836dc97b48da0667c9e8159f3fcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Kl=C3=AD=C4=8D?= Date: Mon, 1 Mar 2010 20:59:08 +0000 Subject: [PATCH 07/71] /var/yp is owned by filesystem package --- yp-tools.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/yp-tools.spec b/yp-tools.spec index 49de8d8..a953ac3 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 2.10 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Base Source: ftp://ftp.kernel.org/pub/linux/utils/net/NIS/yp-tools-%{version}.tar.bz2 @@ -57,9 +57,11 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/*/* /usr/sbin/* /var/yp/nicknames -%dir /var/yp %changelog +* Mon Mar 01 2010 Karel Klic - 2.10-2 +- /var/yp is owned by the filesystem package (#569383) + * Thu Dec 10 2009 Karel Klic - 2.10-1 - Updated to new version - Removed unnecessary obsoletes From 69a8fd30b653e090b9df176b9f7ac6cb065750f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Kl=C3=AD=C4=8D?= Date: Fri, 16 Apr 2010 11:54:41 +0000 Subject: [PATCH 08/71] Added a new patch -passwords, which merges -md5 and -sha-2 patches together, and adds proper MD5/SHA support to verifypassword() #514061 --- yp-tools-2.10-passwords.patch | 226 ++++++++++++++++++++++++++++++++++ yp-tools-2.7-md5.patch | 109 ---------------- yp-tools-2.9-sha-2.patch | 130 ------------------- yp-tools.spec | 14 ++- 4 files changed, 235 insertions(+), 244 deletions(-) create mode 100644 yp-tools-2.10-passwords.patch delete mode 100644 yp-tools-2.7-md5.patch delete mode 100644 yp-tools-2.9-sha-2.patch diff --git a/yp-tools-2.10-passwords.patch b/yp-tools-2.10-passwords.patch new file mode 100644 index 0000000..5e95077 --- /dev/null +++ b/yp-tools-2.10-passwords.patch @@ -0,0 +1,226 @@ +diff -up yp-tools-2.10/src/yppasswd.c.passwords yp-tools-2.10/src/yppasswd.c +--- yp-tools-2.10/src/yppasswd.c.passwords 2004-06-21 14:12:24.000000000 +0200 ++++ yp-tools-2.10/src/yppasswd.c 2010-04-16 11:32:58.931877499 +0200 +@@ -50,6 +50,8 @@ + #include + #include + #include ++#include ++#include + #include + #include + #ifdef HAVE_RPC_CLNT_SOC_H +@@ -368,6 +370,49 @@ getfield (char *gecos, char *field, int + return sp; + } + ++#define DES 0 ++#define MD5 1 ++#define SHA_256 5 ++#define SHA_512 6 ++ ++static int ++get_hash_id (const char *passwd) ++{ ++ int hash_id = DES; ++ if (strncmp(passwd, "$1$", 3) == 0) ++ hash_id = MD5; ++ else if (strncmp(passwd, "$5$", 3) == 0) ++ hash_id = SHA_256; ++ else if (strncmp(passwd, "$6$", 3) == 0) ++ hash_id = SHA_512; ++ return hash_id; ++} ++ ++static int ++get_passwd_len (const char *passwd) ++{ ++ static const char *allowed_chars = ++ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./"; ++ int passwdlen = strlen (passwd); ++ int hash_id = get_hash_id (passwd); ++ ++ /* Some systems (HPU/X) store the password aging info after ++ * the password (with a comma to separate it). To support ++ * this we cut the password after the first invalid char ++ * after the normal 13 ones - in the case of MD5 and DES. ++ * We can't cut at the first invalid char, since MD5 ++ * uses $ in the first char. In case of SHA-2 we are looking ++ * for first invalid char after the 38 ones. ++ */ ++ if (passwdlen > 13 && (hash_id == DES || hash_id == MD5)) ++ passwdlen = 13 + strspn (passwd + 13, allowed_chars); ++ ++ if (passwdlen > 38 && (hash_id == SHA_256 || hash_id == SHA_512)) ++ passwdlen = 38 + strspn (passwd + 38, allowed_chars); ++ ++ return passwdlen; ++} ++ + #if ! defined(USE_CRACKLIB) || defined(USE_CRACKLIB_STRICT) + /* this function will verify the user's password + * for some silly things. If we're using cracklib, then +@@ -379,6 +424,7 @@ verifypassword (struct passwd *pwd, char + { + char *p, *q; + int ucase, lcase, other, r; ++ int passwdlen; + + if ((strlen (pwdstr) < 6) && uid) + { +@@ -401,8 +447,9 @@ verifypassword (struct passwd *pwd, char + return 0; + } + ++ passwdlen = get_passwd_len (pwd->pw_passwd); + if (pwd->pw_passwd[0] +- && !strncmp (pwd->pw_passwd, crypt (pwdstr, pwd->pw_passwd), 13) ++ && !strncmp (pwd->pw_passwd, crypt (pwdstr, pwd->pw_passwd), passwdlen) + && uid) + { + fputs (_("You cannot reuse the old password.\n"), stderr); +@@ -436,11 +483,43 @@ verifypassword (struct passwd *pwd, char + + #endif + ++#define bin_to_ascii(c) ((c)>=38?((c)-38+'a'):(c)>=12?((c)-12+'A'):(c)+'.') ++ ++static void ++create_random_salt (char *salt, int num_chars) ++{ ++ int fd; ++ unsigned char c; ++ int i; ++ int res; ++ ++ fd = open ("/dev/urandom", O_RDONLY); ++ ++ for (i = 0; i < num_chars; i++) ++ { ++ res = 0; ++ if (fd != 0) ++ res = read (fd, &c, 1); ++ ++ if (res != 1) ++ c = random (); ++ ++ salt[i] = bin_to_ascii (c & 0x3f); ++ } ++ ++ salt[num_chars] = 0; ++ ++ if (fd != 0) ++ close (fd); ++} ++ + int + main (int argc, char **argv) + { + char *s, *progname, *domainname = NULL, *user = NULL, *master = NULL; + int f_flag = 0, l_flag = 0, p_flag = 0, error, status; ++ int hash_id = DES; ++ char rounds[11] = "\0"; /* max length is '999999999$' */ + struct yppasswd yppwd; + struct passwd *pwd; + CLIENT *clnt; +@@ -451,6 +530,8 @@ main (int argc, char **argv) + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + ++ srandom (time (NULL)); ++ + if ((s = strrchr (argv[0], '/')) != NULL) + progname = s + 1; + else +@@ -642,27 +723,22 @@ main (int argc, char **argv) + cp = stpcpy (hashpass, "##"); + strcpy (cp, pwd->pw_name); + ++ hash_id = get_hash_id (pwd->pw_passwd); ++ ++ /* Preserve 'rounds=$' (if present) in case of SHA-2 */ ++ if (hash_id == SHA_256 || hash_id == SHA_512) ++ { ++ if (strncmp (pwd->pw_passwd + 3, "rounds=", 7) == 0) ++ strncpy (rounds, pwd->pw_passwd + 10, strcspn (pwd->pw_passwd + 10, "$") + 1); ++ } ++ + /* 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 && + strcmp (pwd->pw_passwd, hashpass ) != 0) + { +- int passwdlen; +- char *sane_passwd; +- passwdlen = strlen (pwd->pw_passwd); +- /* Some systems (HPU/X) store the password aging info after +- * the password (with a comma to separate it). To support +- * this we cut the password after the first invalid char +- * after the normal 13 ones. We can't cut at the first +- * invalid char, since MD5 uses $ in the first char. +- */ +- if (passwdlen > 13) +- passwdlen = 13 + strspn(pwd->pw_passwd + 13, +- "abcdefghijklmnopqrstuvwxyz" +- "ABCDEFGHIJKLMNOPQRSTUVWXYZ" +- "0123456789./"); +- +- sane_passwd = alloca (passwdlen + 1); ++ int passwdlen = get_passwd_len (pwd->pw_passwd); ++ char *sane_passwd = alloca (passwdlen + 1); + strncpy (sane_passwd, pwd->pw_passwd, passwdlen); + sane_passwd[passwdlen] = 0; + if (strcmp (crypt (s, sane_passwd), sane_passwd)) +@@ -676,13 +752,11 @@ main (int argc, char **argv) + + if (p_flag) + { +-#define bin_to_ascii(c) ((c)>=38?((c)-38+'a'):(c)>=12?((c)-12+'A'):(c)+'.') + #ifdef USE_CRACKLIB + char *error_msg; + #endif /* USE_CRACKLIB */ +- char *buf, salt[2], *p = NULL; ++ char *buf, salt[37], *p = NULL; + int tries = 0; +- time_t tm; + + buf = (char *) malloc (129); + +@@ -733,9 +807,34 @@ main (int argc, char **argv) + } + } + +- time (&tm); +- salt[0] = bin_to_ascii (tm & 0x3f); +- salt[1] = bin_to_ascii ((tm >> 6) & 0x3f); ++ switch (hash_id) ++ { ++ case DES: ++ create_random_salt (salt, 2); ++ break; ++ ++ case MD5: ++ /* The user already had a MD5 password, so it's safe to ++ * use a MD5 password again */ ++ strcpy (salt, "$1$"); ++ create_random_salt (salt + 3, 8); ++ break; ++ ++ case SHA_256: ++ case SHA_512: ++ /* The user already had a SHA-2 password, so it's safe to ++ * use a SHA-2 password again */ ++ snprintf (salt, 4, "$%d$", hash_id); ++ if (strlen (rounds) != 0) ++ { ++ strcpy (salt + 3, "rounds="); ++ strcpy (salt + 3 + 7, rounds); ++ create_random_salt (salt + 3 + 7 + strlen (rounds), 16); ++ } ++ else ++ create_random_salt (salt + 3, 16); ++ break; ++ } + + yppwd.newpw.pw_passwd = strdup (crypt (buf, salt)); + } diff --git a/yp-tools-2.7-md5.patch b/yp-tools-2.7-md5.patch deleted file mode 100644 index df823f1..0000000 --- a/yp-tools-2.7-md5.patch +++ /dev/null @@ -1,109 +0,0 @@ ---- yp-tools-2.8/src/yppasswd.c.orig 2002-12-05 08:49:20.000000000 -0500 -+++ yp-tools-2.8/src/yppasswd.c 2003-04-23 14:58:13.000000000 -0400 -@@ -49,6 +49,8 @@ - #include - #include - #include -+#include -+#include - #include - #include - #include -@@ -436,11 +438,44 @@ verifypassword (struct passwd *pwd, char - - #endif - -+#define bin_to_ascii(c) ((c)>=38?((c)-38+'a'):(c)>=12?((c)-12+'A'):(c)+'.') -+ -+static void -+create_random_salt (char *salt, int num_chars) -+{ -+ int fd; -+ unsigned char c; -+ int i; -+ int res; -+ -+ fd = open("/dev/urandom", O_RDONLY); -+ -+ for (i = 0; i < num_chars; i++) -+ { -+ res = 0; -+ -+ if (fd != 0) -+ res = read (fd, &c, 1); -+ -+ if (res != 1) -+ c = random(); -+ -+ salt[i] = bin_to_ascii(c & 0x3f); -+ } -+ -+ salt[num_chars] = 0; -+ -+ if (fd != 0) -+ close (fd); -+} -+ -+ - int - main (int argc, char **argv) - { - char *s, *progname, *domainname = NULL, *user = NULL, *master = NULL; - int f_flag = 0, l_flag = 0, p_flag = 0, error, status; -+ int has_md5_passwd = 0; - struct yppasswd yppwd; - struct passwd *pwd; - CLIENT *clnt; -@@ -451,6 +486,8 @@ main (int argc, char **argv) - bindtextdomain (PACKAGE, LOCALEDIR); - textdomain (PACKAGE); - -+ srandom (time (NULL)); -+ - if ((s = strrchr (argv[0], '/')) != NULL) - progname = s + 1; - else -@@ -642,6 +679,9 @@ main (int argc, char **argv) - cp = stpcpy (hashpass, "##"); - strcpy (cp, pwd->pw_name); - -+ if (strncmp(pwd->pw_passwd, "$1$", 3) == 0) -+ has_md5_passwd = 1; -+ - /* 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 && -@@ -676,13 +716,11 @@ main (int argc, char **argv) - - if (p_flag) - { --#define bin_to_ascii(c) ((c)>=38?((c)-38+'a'):(c)>=12?((c)-12+'A'):(c)+'.') - #ifdef USE_CRACKLIB - char *error_msg; - #endif /* USE_CRACKLIB */ -- char *buf, salt[2], *p = NULL; -+ char *buf, salt[12], *p = NULL; - int tries = 0; -- time_t tm; - - buf = (char *) malloc (129); - -@@ -733,9 +771,15 @@ main (int argc, char **argv) - } - } - -- time (&tm); -- salt[0] = bin_to_ascii (tm & 0x3f); -- salt[1] = bin_to_ascii ((tm >> 6) & 0x3f); -+ if (!has_md5_passwd) -+ create_random_salt (salt, 2); -+ else -+ { -+ /* The user already had a MD5 password, so it's safe to -+ * use a MD5 password again */ -+ strcpy (salt, "$1$"); -+ create_random_salt (salt+3, 8); -+ } - - yppwd.newpw.pw_passwd = strdup (crypt (buf, salt)); - } diff --git a/yp-tools-2.9-sha-2.patch b/yp-tools-2.9-sha-2.patch deleted file mode 100644 index 1b81eed..0000000 --- a/yp-tools-2.9-sha-2.patch +++ /dev/null @@ -1,130 +0,0 @@ -diff -up yp-tools-2.9/src/yppasswd.c_old yp-tools-2.9/src/yppasswd.c ---- yp-tools-2.9/src/yppasswd.c_old 2009-03-03 15:23:49.000000000 +0100 -+++ yp-tools-2.9/src/yppasswd.c 2009-03-04 12:39:34.000000000 +0100 -@@ -475,7 +475,8 @@ main (int argc, char **argv) - { - char *s, *progname, *domainname = NULL, *user = NULL, *master = NULL; - int f_flag = 0, l_flag = 0, p_flag = 0, error, status; -- int has_md5_passwd = 0; -+ int hash_id = DES; -+ char rounds[11] = "\0"; /* max length is '999999999$' */ - struct yppasswd yppwd; - struct passwd *pwd; - CLIENT *clnt; -@@ -680,7 +681,18 @@ main (int argc, char **argv) - strcpy (cp, pwd->pw_name); - - if (strncmp(pwd->pw_passwd, "$1$", 3) == 0) -- has_md5_passwd = 1; -+ hash_id = MD5; -+ -+ if (strncmp(pwd->pw_passwd, "$5$", 3) == 0) -+ hash_id = SHA_256; -+ -+ if (strncmp(pwd->pw_passwd, "$6$", 3) == 0) -+ hash_id = SHA_512; -+ -+ /* Preserve 'rounds=$' (if present) in case of SHA-2 */ -+ if (hash_id == SHA_256 || hash_id == SHA_512) -+ if (strncmp(pwd->pw_passwd + 3, "rounds=", 7) == 0) -+ strncpy(rounds, pwd->pw_passwd + 10, strcspn(pwd->pw_passwd + 10, "$") + 1); - - /* We can't check the password with shadow passwords enabled. We - * leave the checking to yppasswdd */ -@@ -693,15 +705,23 @@ main (int argc, char **argv) - /* Some systems (HPU/X) store the password aging info after - * the password (with a comma to separate it). To support - * this we cut the password after the first invalid char -- * after the normal 13 ones. We can't cut at the first -- * invalid char, since MD5 uses $ in the first char. -+ * after the normal 13 ones - in case of MD5 (and DES). -+ * We can't cut at the first invalid char, since MD5 -+ * uses $ in the first char. In case of SHA-2 we are looking -+ * for first invalid char after the 38 ones. - */ -- if (passwdlen > 13) -- passwdlen = 13 + strspn(pwd->pw_passwd + 13, -+ if (passwdlen > 13 && (hash_id == DES || hash_id == MD5)) -+ passwdlen = 13 + strspn(pwd->pw_passwd + 13, - "abcdefghijklmnopqrstuvwxyz" - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - "0123456789./"); - -+ if (passwdlen > 38 && (hash_id == SHA_256 || hash_id == SHA_512)) -+ passwdlen = 38 + strspn(pwd->pw_passwd + 38, -+ "abcdefghijklmnopqrstuvwxyz" -+ "ABCDEFGHIJKLMNOPQRSTUVWXYZ" -+ "0123456789./"); -+ - sane_passwd = alloca (passwdlen + 1); - strncpy (sane_passwd, pwd->pw_passwd, passwdlen); - sane_passwd[passwdlen] = 0; -@@ -719,7 +739,7 @@ main (int argc, char **argv) - #ifdef USE_CRACKLIB - char *error_msg; - #endif /* USE_CRACKLIB */ -- char *buf, salt[12], *p = NULL; -+ char *buf, salt[37], *p = NULL; - int tries = 0; - - buf = (char *) malloc (129); -@@ -771,15 +791,37 @@ main (int argc, char **argv) - } - } - -- if (!has_md5_passwd) -- create_random_salt (salt, 2); -- else -- { -- /* The user already had a MD5 password, so it's safe to -- * use a MD5 password again */ -- strcpy (salt, "$1$"); -- create_random_salt (salt+3, 8); -- } -+ switch (hash_id) -+ { -+ case DES: -+ create_random_salt (salt, 2); -+ break; -+ -+ case MD5: -+ /* The user already had a MD5 password, so it's safe to -+ * use a MD5 password again */ -+ strcpy (salt, "$1$"); -+ create_random_salt (salt+3, 8); -+ break; -+ -+ case SHA_256: -+ case SHA_512: -+ /* The user already had a SHA-2 password, so it's safe to -+ * use a SHA-2 password again */ -+ snprintf(salt, 4, "$%d$", hash_id); -+ if (strlen(rounds) != 0) -+ { -+ strcpy (salt+3, "rounds="); -+ strcpy (salt+3+7, rounds); -+ create_random_salt (salt+3+7+strlen(rounds), 16); -+ } -+ else -+ create_random_salt (salt+3, 16); -+ -+ break; -+ default: -+ break; -+ } - - yppwd.newpw.pw_passwd = strdup (crypt (buf, salt)); - } -diff -up yp-tools-2.9/src/yppasswd.h_old yp-tools-2.9/src/yppasswd.h ---- yp-tools-2.9/src/yppasswd.h_old 2009-03-04 10:49:41.000000000 +0100 -+++ yp-tools-2.9/src/yppasswd.h 2009-03-04 11:16:41.000000000 +0100 -@@ -46,4 +46,9 @@ typedef struct yppasswd yppasswd; - extern bool_t xdr_xpasswd (XDR *, xpasswd*); - extern bool_t xdr_yppasswd (XDR *, yppasswd*); - -+#define DES 0 -+#define MD5 1 -+#define SHA_256 5 -+#define SHA_512 6 -+ - #endif /* !__YPPASSWD_H__ */ diff --git a/yp-tools.spec b/yp-tools.spec index a953ac3..da63077 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,13 +1,13 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 2.10 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Group: System Environment/Base Source: ftp://ftp.kernel.org/pub/linux/utils/net/NIS/yp-tools-%{version}.tar.bz2 Url: http://www.linux-nis.org/nis/yp-tools/index.html -Patch1: yp-tools-2.7-md5.patch -Patch2: yp-tools-2.9-sha-2.patch +# Sent to the upstream. +Patch1: yp-tools-2.10-passwords.patch Requires: ypbind Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -33,8 +33,7 @@ you'll need to install the ypserv package on one machine on the network. %prep %setup -q -%patch1 -p1 -b .md5 -%patch2 -p1 -b .sha-2 +%patch1 -p1 -b .passwords %build %configure --disable-domainname @@ -59,6 +58,11 @@ rm -rf $RPM_BUILD_ROOT /var/yp/nicknames %changelog +* Thu Apr 15 2010 Karel Klic - 2.10-3 +- Added a new patch -passwords, which merges -md5 and -sha-2 patches + together, and adds proper MD5/SHA support to verifypassword() + #514061 + * Mon Mar 01 2010 Karel Klic - 2.10-2 - /var/yp is owned by the filesystem package (#569383) From 6c1fe3cd27da766b5698e2a1bfb5e409bf85f1ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Kl=C3=AD=C4=8D?= Date: Tue, 20 Apr 2010 14:25:05 +0000 Subject: [PATCH 09/71] New upstream release --- .cvsignore | 2 +- sources | 2 +- yp-tools-2.10-passwords.patch | 226 ---------------------------------- yp-tools.spec | 13 +- 4 files changed, 9 insertions(+), 234 deletions(-) delete mode 100644 yp-tools-2.10-passwords.patch diff --git a/.cvsignore b/.cvsignore index 9b2d11c..9ceb168 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -yp-tools-2.10.tar.bz2 +yp-tools-2.11.tar.bz2 diff --git a/sources b/sources index c66c8c3..0d7830e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c1bc7ea2339c766d8e6dffd3f5f2e8e1 yp-tools-2.10.tar.bz2 +ea7627e97d31c1e16296db96110b1da2 yp-tools-2.11.tar.bz2 diff --git a/yp-tools-2.10-passwords.patch b/yp-tools-2.10-passwords.patch deleted file mode 100644 index 5e95077..0000000 --- a/yp-tools-2.10-passwords.patch +++ /dev/null @@ -1,226 +0,0 @@ -diff -up yp-tools-2.10/src/yppasswd.c.passwords yp-tools-2.10/src/yppasswd.c ---- yp-tools-2.10/src/yppasswd.c.passwords 2004-06-21 14:12:24.000000000 +0200 -+++ yp-tools-2.10/src/yppasswd.c 2010-04-16 11:32:58.931877499 +0200 -@@ -50,6 +50,8 @@ - #include - #include - #include -+#include -+#include - #include - #include - #ifdef HAVE_RPC_CLNT_SOC_H -@@ -368,6 +370,49 @@ getfield (char *gecos, char *field, int - return sp; - } - -+#define DES 0 -+#define MD5 1 -+#define SHA_256 5 -+#define SHA_512 6 -+ -+static int -+get_hash_id (const char *passwd) -+{ -+ int hash_id = DES; -+ if (strncmp(passwd, "$1$", 3) == 0) -+ hash_id = MD5; -+ else if (strncmp(passwd, "$5$", 3) == 0) -+ hash_id = SHA_256; -+ else if (strncmp(passwd, "$6$", 3) == 0) -+ hash_id = SHA_512; -+ return hash_id; -+} -+ -+static int -+get_passwd_len (const char *passwd) -+{ -+ static const char *allowed_chars = -+ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./"; -+ int passwdlen = strlen (passwd); -+ int hash_id = get_hash_id (passwd); -+ -+ /* Some systems (HPU/X) store the password aging info after -+ * the password (with a comma to separate it). To support -+ * this we cut the password after the first invalid char -+ * after the normal 13 ones - in the case of MD5 and DES. -+ * We can't cut at the first invalid char, since MD5 -+ * uses $ in the first char. In case of SHA-2 we are looking -+ * for first invalid char after the 38 ones. -+ */ -+ if (passwdlen > 13 && (hash_id == DES || hash_id == MD5)) -+ passwdlen = 13 + strspn (passwd + 13, allowed_chars); -+ -+ if (passwdlen > 38 && (hash_id == SHA_256 || hash_id == SHA_512)) -+ passwdlen = 38 + strspn (passwd + 38, allowed_chars); -+ -+ return passwdlen; -+} -+ - #if ! defined(USE_CRACKLIB) || defined(USE_CRACKLIB_STRICT) - /* this function will verify the user's password - * for some silly things. If we're using cracklib, then -@@ -379,6 +424,7 @@ verifypassword (struct passwd *pwd, char - { - char *p, *q; - int ucase, lcase, other, r; -+ int passwdlen; - - if ((strlen (pwdstr) < 6) && uid) - { -@@ -401,8 +447,9 @@ verifypassword (struct passwd *pwd, char - return 0; - } - -+ passwdlen = get_passwd_len (pwd->pw_passwd); - if (pwd->pw_passwd[0] -- && !strncmp (pwd->pw_passwd, crypt (pwdstr, pwd->pw_passwd), 13) -+ && !strncmp (pwd->pw_passwd, crypt (pwdstr, pwd->pw_passwd), passwdlen) - && uid) - { - fputs (_("You cannot reuse the old password.\n"), stderr); -@@ -436,11 +483,43 @@ verifypassword (struct passwd *pwd, char - - #endif - -+#define bin_to_ascii(c) ((c)>=38?((c)-38+'a'):(c)>=12?((c)-12+'A'):(c)+'.') -+ -+static void -+create_random_salt (char *salt, int num_chars) -+{ -+ int fd; -+ unsigned char c; -+ int i; -+ int res; -+ -+ fd = open ("/dev/urandom", O_RDONLY); -+ -+ for (i = 0; i < num_chars; i++) -+ { -+ res = 0; -+ if (fd != 0) -+ res = read (fd, &c, 1); -+ -+ if (res != 1) -+ c = random (); -+ -+ salt[i] = bin_to_ascii (c & 0x3f); -+ } -+ -+ salt[num_chars] = 0; -+ -+ if (fd != 0) -+ close (fd); -+} -+ - int - main (int argc, char **argv) - { - char *s, *progname, *domainname = NULL, *user = NULL, *master = NULL; - int f_flag = 0, l_flag = 0, p_flag = 0, error, status; -+ int hash_id = DES; -+ char rounds[11] = "\0"; /* max length is '999999999$' */ - struct yppasswd yppwd; - struct passwd *pwd; - CLIENT *clnt; -@@ -451,6 +530,8 @@ main (int argc, char **argv) - bindtextdomain (PACKAGE, LOCALEDIR); - textdomain (PACKAGE); - -+ srandom (time (NULL)); -+ - if ((s = strrchr (argv[0], '/')) != NULL) - progname = s + 1; - else -@@ -642,27 +723,22 @@ main (int argc, char **argv) - cp = stpcpy (hashpass, "##"); - strcpy (cp, pwd->pw_name); - -+ hash_id = get_hash_id (pwd->pw_passwd); -+ -+ /* Preserve 'rounds=$' (if present) in case of SHA-2 */ -+ if (hash_id == SHA_256 || hash_id == SHA_512) -+ { -+ if (strncmp (pwd->pw_passwd + 3, "rounds=", 7) == 0) -+ strncpy (rounds, pwd->pw_passwd + 10, strcspn (pwd->pw_passwd + 10, "$") + 1); -+ } -+ - /* 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 && - strcmp (pwd->pw_passwd, hashpass ) != 0) - { -- int passwdlen; -- char *sane_passwd; -- passwdlen = strlen (pwd->pw_passwd); -- /* Some systems (HPU/X) store the password aging info after -- * the password (with a comma to separate it). To support -- * this we cut the password after the first invalid char -- * after the normal 13 ones. We can't cut at the first -- * invalid char, since MD5 uses $ in the first char. -- */ -- if (passwdlen > 13) -- passwdlen = 13 + strspn(pwd->pw_passwd + 13, -- "abcdefghijklmnopqrstuvwxyz" -- "ABCDEFGHIJKLMNOPQRSTUVWXYZ" -- "0123456789./"); -- -- sane_passwd = alloca (passwdlen + 1); -+ int passwdlen = get_passwd_len (pwd->pw_passwd); -+ char *sane_passwd = alloca (passwdlen + 1); - strncpy (sane_passwd, pwd->pw_passwd, passwdlen); - sane_passwd[passwdlen] = 0; - if (strcmp (crypt (s, sane_passwd), sane_passwd)) -@@ -676,13 +752,11 @@ main (int argc, char **argv) - - if (p_flag) - { --#define bin_to_ascii(c) ((c)>=38?((c)-38+'a'):(c)>=12?((c)-12+'A'):(c)+'.') - #ifdef USE_CRACKLIB - char *error_msg; - #endif /* USE_CRACKLIB */ -- char *buf, salt[2], *p = NULL; -+ char *buf, salt[37], *p = NULL; - int tries = 0; -- time_t tm; - - buf = (char *) malloc (129); - -@@ -733,9 +807,34 @@ main (int argc, char **argv) - } - } - -- time (&tm); -- salt[0] = bin_to_ascii (tm & 0x3f); -- salt[1] = bin_to_ascii ((tm >> 6) & 0x3f); -+ switch (hash_id) -+ { -+ case DES: -+ create_random_salt (salt, 2); -+ break; -+ -+ case MD5: -+ /* The user already had a MD5 password, so it's safe to -+ * use a MD5 password again */ -+ strcpy (salt, "$1$"); -+ create_random_salt (salt + 3, 8); -+ break; -+ -+ case SHA_256: -+ case SHA_512: -+ /* The user already had a SHA-2 password, so it's safe to -+ * use a SHA-2 password again */ -+ snprintf (salt, 4, "$%d$", hash_id); -+ if (strlen (rounds) != 0) -+ { -+ strcpy (salt + 3, "rounds="); -+ strcpy (salt + 3 + 7, rounds); -+ create_random_salt (salt + 3 + 7 + strlen (rounds), 16); -+ } -+ else -+ create_random_salt (salt + 3, 16); -+ break; -+ } - - yppwd.newpw.pw_passwd = strdup (crypt (buf, salt)); - } diff --git a/yp-tools.spec b/yp-tools.spec index da63077..2a50ab8 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,15 +1,12 @@ Summary: NIS (or YP) client programs Name: yp-tools -Version: 2.10 -Release: 3%{?dist} +Version: 2.11 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Base Source: ftp://ftp.kernel.org/pub/linux/utils/net/NIS/yp-tools-%{version}.tar.bz2 Url: http://www.linux-nis.org/nis/yp-tools/index.html -# Sent to the upstream. -Patch1: yp-tools-2.10-passwords.patch Requires: ypbind -Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description The Network Information Service (NIS) is a system which provides @@ -33,7 +30,6 @@ you'll need to install the ypserv package on one machine on the network. %prep %setup -q -%patch1 -p1 -b .passwords %build %configure --disable-domainname @@ -58,6 +54,11 @@ rm -rf $RPM_BUILD_ROOT /var/yp/nicknames %changelog +* Tue Apr 20 2010 Karel Klic - 2.11-1 +- New upstream release +- MD5, SHA-2 passwords patch merged by upstream +- Removed BuildRoot tag + * Thu Apr 15 2010 Karel Klic - 2.10-3 - Added a new patch -passwords, which merges -md5 and -sha-2 patches together, and adds proper MD5/SHA support to verifypassword() From 7f15ce4c18cd0493c67d027ffb5a9265b036af0f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 16:22:08 +0000 Subject: [PATCH 10/71] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- 2 files changed, 21 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index ec5e41f..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: yp-tools -# $Id: Makefile,v 1.2 2007/10/15 19:38:34 notting Exp $ -NAME := yp-tools -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attempt a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) From 53ee8b67a323888b38f8f3cf4119bd552b373f24 Mon Sep 17 00:00:00 2001 From: Karel Klic Date: Fri, 19 Nov 2010 18:40:21 +0100 Subject: [PATCH 11/71] rhbz#653921 - Can't change NIS password with yppasswd --- yp-tools-2.11-shadow.patch | 11 +++++++++++ yp-tools.spec | 14 +++++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 yp-tools-2.11-shadow.patch diff --git a/yp-tools-2.11-shadow.patch b/yp-tools-2.11-shadow.patch new file mode 100644 index 0000000..1813ac4 --- /dev/null +++ b/yp-tools-2.11-shadow.patch @@ -0,0 +1,11 @@ +diff -up yp-tools-2.11/src/yppasswd.c.shadow yp-tools-2.11/src/yppasswd.c +--- yp-tools-2.11/src/yppasswd.c.shadow 2010-04-20 15:31:59.000000000 +0200 ++++ yp-tools-2.11/src/yppasswd.c 2010-11-19 18:37:14.931766315 +0100 +@@ -449,6 +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 */ + && !strncmp (pwd->pw_passwd, crypt (pwdstr, pwd->pw_passwd), passwdlen) + && uid) + { diff --git a/yp-tools.spec b/yp-tools.spec index 2a50ab8..5838937 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,10 +1,11 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 2.11 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Base Source: ftp://ftp.kernel.org/pub/linux/utils/net/NIS/yp-tools-%{version}.tar.bz2 +Patch0: yp-tools-2.11-shadow.patch Url: http://www.linux-nis.org/nis/yp-tools/index.html Requires: ypbind @@ -30,6 +31,7 @@ you'll need to install the ypserv package on one machine on the network. %prep %setup -q +%patch0 -p1 -b .shadow %build %configure --disable-domainname @@ -41,9 +43,6 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install %find_lang %name -%clean -rm -rf $RPM_BUILD_ROOT - %files -f %{name}.lang %defattr(-,root,root,-) %doc AUTHORS COPYING README ChangeLog NEWS etc/nsswitch.conf @@ -54,13 +53,18 @@ rm -rf $RPM_BUILD_ROOT /var/yp/nicknames %changelog +* Fri Nov 19 2010 Karel Klic - 2.11-2 +- Added patch to fix yppasswd utility when used with shadow + passwords (rhbz#653921) +- Removed %%clean section + * Tue Apr 20 2010 Karel Klic - 2.11-1 - New upstream release - MD5, SHA-2 passwords patch merged by upstream - Removed BuildRoot tag * Thu Apr 15 2010 Karel Klic - 2.10-3 -- Added a new patch -passwords, which merges -md5 and -sha-2 patches +- Added a new patch -passwords, which merges -md5 and -sha-2 patches together, and adds proper MD5/SHA support to verifypassword() #514061 From ecaa219e350f73aa47897331d997a90781cea0c2 Mon Sep 17 00:00:00 2001 From: Karel Klic Date: Fri, 19 Nov 2010 19:39:31 +0100 Subject: [PATCH 12/71] New upstream release --- .gitignore | 1 + sources | 2 +- yp-tools.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 9ceb168..afd6fe0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ yp-tools-2.11.tar.bz2 +/yp-tools-2.12.tar.bz2 diff --git a/sources b/sources index 0d7830e..f56cd79 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ea7627e97d31c1e16296db96110b1da2 yp-tools-2.11.tar.bz2 +ce1e06d86caa285fa8cd76fdf103f51e yp-tools-2.12.tar.bz2 diff --git a/yp-tools.spec b/yp-tools.spec index 5838937..c61a4b0 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools -Version: 2.11 -Release: 2%{?dist} +Version: 2.12 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Base Source: ftp://ftp.kernel.org/pub/linux/utils/net/NIS/yp-tools-%{version}.tar.bz2 @@ -53,6 +53,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Fri Nov 19 2010 Karel Klic - 2.12-1 +- New upstream version + * Fri Nov 19 2010 Karel Klic - 2.11-2 - Added patch to fix yppasswd utility when used with shadow passwords (rhbz#653921) From ec87306b29b381ed73c72af856f8216964433734 Mon Sep 17 00:00:00 2001 From: Karel Klic Date: Tue, 23 Nov 2010 13:59:42 +0100 Subject: [PATCH 13/71] Do not compile ypmatch with ypclnt.c, use glibc's implementation instead of it --- yp-tools-2.12-noypclnt.patch | 11 +++++++++++ yp-tools.spec | 13 ++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 yp-tools-2.12-noypclnt.patch diff --git a/yp-tools-2.12-noypclnt.patch b/yp-tools-2.12-noypclnt.patch new file mode 100644 index 0000000..77fa1d3 --- /dev/null +++ b/yp-tools-2.12-noypclnt.patch @@ -0,0 +1,11 @@ +diff -up yp-tools-2.12/src/Makefile.am.noypclnt yp-tools-2.12/src/Makefile.am +--- yp-tools-2.12/src/Makefile.am.noypclnt 2010-11-23 13:32:54.328891585 +0100 ++++ yp-tools-2.12/src/Makefile.am 2010-11-23 13:33:02.167767691 +0100 +@@ -21,7 +21,6 @@ yppasswd_SOURCES = yppasswd.c yppasswd_x + yppasswd_LDADD = ${LDADD} @LIBCRYPT@ @LIBCRACK@ + yppasswd_CFLAGS = -DPASSWD_PROG=\"${PASSWD_PROG}\" \ + -DCHFN_PROG=\"${CHFN_PROG}\" -DCHSH_PROG=\"${CHSH_PROG}\" +-ypmatch_SOURCES = ypmatch.c ypclnt.c + + install-exec-hook: + ln -f ${DESTDIR}${bindir}/yppasswd ${DESTDIR}${bindir}/ypchsh diff --git a/yp-tools.spec b/yp-tools.spec index c61a4b0..6c6c51e 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,13 +1,18 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 2.12 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Base Source: ftp://ftp.kernel.org/pub/linux/utils/net/NIS/yp-tools-%{version}.tar.bz2 +# Not sent to upstream Patch0: yp-tools-2.11-shadow.patch +# Not sent to upstream +Patch1: yp-tools-2.12-noypclnt.patch Url: http://www.linux-nis.org/nis/yp-tools/index.html Requires: ypbind +# We need autoreconf for Patch1. +BuildRequires: autoconf, automake %description The Network Information Service (NIS) is a system which provides @@ -32,8 +37,10 @@ you'll need to install the ypserv package on one machine on the network. %prep %setup -q %patch0 -p1 -b .shadow +%patch1 -p1 -b .noypclnt %build +autoreconf %configure --disable-domainname make @@ -53,6 +60,10 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Tue Nov 23 2010 Karel Klic - 2.12-2 +- Added patch that removes ypclnt.c from being compiled into + ypmatch (rhbz#546149) + * Fri Nov 19 2010 Karel Klic - 2.12-1 - New upstream version From 301b438db1a69ed264b6c4494d4f8b8133a0eae5 Mon Sep 17 00:00:00 2001 From: Karel Klic Date: Tue, 23 Nov 2010 14:42:16 +0100 Subject: [PATCH 14/71] Reverted previous change --- yp-tools-2.12-noypclnt.patch | 11 ----------- yp-tools.spec | 11 ++++------- 2 files changed, 4 insertions(+), 18 deletions(-) delete mode 100644 yp-tools-2.12-noypclnt.patch diff --git a/yp-tools-2.12-noypclnt.patch b/yp-tools-2.12-noypclnt.patch deleted file mode 100644 index 77fa1d3..0000000 --- a/yp-tools-2.12-noypclnt.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up yp-tools-2.12/src/Makefile.am.noypclnt yp-tools-2.12/src/Makefile.am ---- yp-tools-2.12/src/Makefile.am.noypclnt 2010-11-23 13:32:54.328891585 +0100 -+++ yp-tools-2.12/src/Makefile.am 2010-11-23 13:33:02.167767691 +0100 -@@ -21,7 +21,6 @@ yppasswd_SOURCES = yppasswd.c yppasswd_x - yppasswd_LDADD = ${LDADD} @LIBCRYPT@ @LIBCRACK@ - yppasswd_CFLAGS = -DPASSWD_PROG=\"${PASSWD_PROG}\" \ - -DCHFN_PROG=\"${CHFN_PROG}\" -DCHSH_PROG=\"${CHSH_PROG}\" --ypmatch_SOURCES = ypmatch.c ypclnt.c - - install-exec-hook: - ln -f ${DESTDIR}${bindir}/yppasswd ${DESTDIR}${bindir}/ypchsh diff --git a/yp-tools.spec b/yp-tools.spec index 6c6c51e..403a41f 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,18 +1,14 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 2.12 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Group: System Environment/Base Source: ftp://ftp.kernel.org/pub/linux/utils/net/NIS/yp-tools-%{version}.tar.bz2 # Not sent to upstream Patch0: yp-tools-2.11-shadow.patch -# Not sent to upstream -Patch1: yp-tools-2.12-noypclnt.patch Url: http://www.linux-nis.org/nis/yp-tools/index.html Requires: ypbind -# We need autoreconf for Patch1. -BuildRequires: autoconf, automake %description The Network Information Service (NIS) is a system which provides @@ -37,10 +33,8 @@ you'll need to install the ypserv package on one machine on the network. %prep %setup -q %patch0 -p1 -b .shadow -%patch1 -p1 -b .noypclnt %build -autoreconf %configure --disable-domainname make @@ -60,6 +54,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Tue Nov 23 2010 Karel Klic - 2.12-3 +- Reverted previous change + * Tue Nov 23 2010 Karel Klic - 2.12-2 - Added patch that removes ypclnt.c from being compiled into ypmatch (rhbz#546149) From fcbd95e824c712a6f73ec7b44d3316f7c40a9741 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 8 Feb 2011 01:48:00 -0600 Subject: [PATCH 15/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild --- yp-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index 403a41f..520d23e 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 2.12 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 Group: System Environment/Base Source: ftp://ftp.kernel.org/pub/linux/utils/net/NIS/yp-tools-%{version}.tar.bz2 @@ -54,6 +54,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Tue Feb 08 2011 Fedora Release Engineering - 2.12-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + * Tue Nov 23 2010 Karel Klic - 2.12-3 - Reverted previous change From 2291a74e8557286bc2f1f79677f1e6713a0982ea Mon Sep 17 00:00:00 2001 From: Honza Horak Date: Fri, 18 Mar 2011 13:57:41 +0100 Subject: [PATCH 16/71] Applied -typo patch to fix a grammar mistake (rhbz#668743) --- yp-tools.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index 520d23e..6394cff 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,12 +1,13 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 2.12 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2 Group: System Environment/Base Source: ftp://ftp.kernel.org/pub/linux/utils/net/NIS/yp-tools-%{version}.tar.bz2 # Not sent to upstream Patch0: yp-tools-2.11-shadow.patch +Patch1: yp-tools-2.12-typo.patch Url: http://www.linux-nis.org/nis/yp-tools/index.html Requires: ypbind @@ -33,6 +34,7 @@ you'll need to install the ypserv package on one machine on the network. %prep %setup -q %patch0 -p1 -b .shadow +%patch1 -p1 -b .typo %build %configure --disable-domainname @@ -54,6 +56,10 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Fri Mar 18 2011 Honza Horak - 2.12-5 +- Applied -typo patch to fix a grammar mistake + (rhbz#668743) + * Tue Feb 08 2011 Fedora Release Engineering - 2.12-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild From 79b5fd34e02705aec34760c7bd76a9368709945f Mon Sep 17 00:00:00 2001 From: Honza Horak Date: Fri, 18 Mar 2011 14:03:43 +0100 Subject: [PATCH 17/71] typo patch added --- yp-tools-2.12-typo.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 yp-tools-2.12-typo.patch diff --git a/yp-tools-2.12-typo.patch b/yp-tools-2.12-typo.patch new file mode 100644 index 0000000..29217f6 --- /dev/null +++ b/yp-tools-2.12-typo.patch @@ -0,0 +1,12 @@ +diff -up yp-tools-2.12/man/ypmatch.1.in.typo yp-tools-2.12/man/ypmatch.1.in +--- yp-tools-2.12/man/ypmatch.1.in.typo 2011-03-18 13:43:29.462662847 +0100 ++++ yp-tools-2.12/man/ypmatch.1.in 2011-03-18 13:44:26.498770766 +0100 +@@ -5,7 +5,7 @@ + .\" + .\" This program is free software; you can redistribute it and/or modify + .\" it under the terms of the GNU General Public License version 2 as +-.\" published bythe Free Software Foundation. ++.\" published by the Free Software Foundation. + .\" + .\" This program is distributed in the hope that it will be useful, + .\" but WITHOUT ANY WARRANTY; without even the implied warranty of From ba4fef62091b90df5afda3cf41da5da492a7d793 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Hor=C3=A1k?= Date: Wed, 4 May 2011 17:07:49 +0200 Subject: [PATCH 18/71] Applied -gethost patch to check return value (rhbz#698619) --- yp-tools-2.12-gethost.patch | 33 +++++++++++++++++++++++++++++++++ yp-tools.spec | 8 +++++++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 yp-tools-2.12-gethost.patch diff --git a/yp-tools-2.12-gethost.patch b/yp-tools-2.12-gethost.patch new file mode 100644 index 0000000..afe782d --- /dev/null +++ b/yp-tools-2.12-gethost.patch @@ -0,0 +1,33 @@ +diff -up yp-tools-2.12/src/yppoll.c.gethost yp-tools-2.12/src/yppoll.c +--- yp-tools-2.12/src/yppoll.c.gethost 2001-12-08 20:59:10.000000000 +0100 ++++ yp-tools-2.12/src/yppoll.c 2011-05-04 16:18:08.371772310 +0200 +@@ -218,7 +218,10 @@ main (int argc, char **argv) + + hent = gethostbyaddr ((char *)&clnt_saddr.sin_addr.s_addr, + sizeof (clnt_saddr.sin_addr.s_addr), AF_INET); +- hostname = strdup (hent->h_name); ++ if (hent) ++ { ++ hostname = strdup (hent->h_name); ++ } + } + else + { +@@ -261,7 +264,7 @@ main (int argc, char **argv) + &clnt_sock); + if (client == NULL) + { +- fprintf (stderr, _("Can't create connection to %s.\n"), hostname); ++ fprintf (stderr, _("Can't create connection to %s.\n"), hostname ? hostname : "unknown"); + return 1; + } + +@@ -279,7 +282,7 @@ main (int argc, char **argv) + if (clnt_res != TRUE) + { + fprintf (stdout, _("Domain %s is not supported by %s.\n"), domainname, +- hostname); ++ hostname ? hostname : "unknown"); + return 1; + } + diff --git a/yp-tools.spec b/yp-tools.spec index 6394cff..c705a15 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,13 +1,14 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 2.12 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2 Group: System Environment/Base Source: ftp://ftp.kernel.org/pub/linux/utils/net/NIS/yp-tools-%{version}.tar.bz2 # Not sent to upstream Patch0: yp-tools-2.11-shadow.patch Patch1: yp-tools-2.12-typo.patch +Patch2: yp-tools-2.12-gethost.patch Url: http://www.linux-nis.org/nis/yp-tools/index.html Requires: ypbind @@ -35,6 +36,7 @@ you'll need to install the ypserv package on one machine on the network. %setup -q %patch0 -p1 -b .shadow %patch1 -p1 -b .typo +%patch2 -p1 -b .gethost %build %configure --disable-domainname @@ -56,6 +58,10 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Wed May 04 2011 Honza Horak - 2.12-6 +- Applied -gethost patch to check return value + (rhbz#698619) + * Fri Mar 18 2011 Honza Horak - 2.12-5 - Applied -typo patch to fix a grammar mistake (rhbz#668743) From 0bf6befb2861403af8255f9b7fb3f0bd345e5d18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Hor=C3=A1k?= Date: Thu, 5 May 2011 09:48:42 +0200 Subject: [PATCH 19/71] space in ypmatch man page removed --- yp-tools-2.12-typo.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yp-tools-2.12-typo.patch b/yp-tools-2.12-typo.patch index 29217f6..68ff90a 100644 --- a/yp-tools-2.12-typo.patch +++ b/yp-tools-2.12-typo.patch @@ -6,7 +6,7 @@ diff -up yp-tools-2.12/man/ypmatch.1.in.typo yp-tools-2.12/man/ypmatch.1.in .\" This program is free software; you can redistribute it and/or modify .\" it under the terms of the GNU General Public License version 2 as -.\" published bythe Free Software Foundation. -+.\" published by the Free Software Foundation. ++.\" published by the Free Software Foundation. .\" .\" This program is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of From 5ca6eb3ac2c6acdf677af7b4de42bbfae5b0a60b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Hor=C3=A1k?= Date: Fri, 9 Sep 2011 16:37:49 +0200 Subject: [PATCH 20/71] Added YP_PASSWD_HASH environment variable to set default algorithm for hashing a new password Resolves: #699666 --- yp-tools-2.12-hash.patch | 68 ++++++++++++++++++++++++++++++++++++++++ yp-tools.spec | 9 +++++- 2 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 yp-tools-2.12-hash.patch diff --git a/yp-tools-2.12-hash.patch b/yp-tools-2.12-hash.patch new file mode 100644 index 0000000..e5aaa0b --- /dev/null +++ b/yp-tools-2.12-hash.patch @@ -0,0 +1,68 @@ +diff -up yp-tools-2.12/man/yppasswd.1.in.hash yp-tools-2.12/man/yppasswd.1.in +--- yp-tools-2.12/man/yppasswd.1.in.hash 2011-09-09 16:18:49.469037058 +0200 ++++ yp-tools-2.12/man/yppasswd.1.in 2011-09-09 16:20:19.101030930 +0200 +@@ -81,6 +81,12 @@ for authentication with the + .BR yppasswdd (8) + daemon. Subsequently, the + program prompts for the updated information: ++.P ++If we use shadowing passwords using passwd.adjunct, SHA-512 will be ++used for hashing a new password by default. If we want to use MD5, ++SHA_256 or older DES, we need to set the environment variable ++YP_PASSWD_HASH. Possible values are "DES", "MD5", "SHA-256" and ++"SHA-512" (value is case-insensitive). + .\" + .\" + .IP "\fByppasswd\fP or \fB-p\fP" +diff -up yp-tools-2.12/src/yppasswd.c.hash yp-tools-2.12/src/yppasswd.c +--- yp-tools-2.12/src/yppasswd.c.hash 2011-09-09 16:20:35.360029823 +0200 ++++ yp-tools-2.12/src/yppasswd.c 2011-09-09 16:25:21.589010245 +0200 +@@ -514,6 +514,32 @@ create_random_salt (char *salt, int num_ + close (fd); + } + ++ ++/* ++ * Reads environment variable YP_PASSWD_HASH and returns hash id. ++ * Possible values are MD5, SHA-256, SHA-512 and DES. ++ * If other value is set or it is not set at all, SHA-512 is used. ++ */ ++static int ++get_env_hash_id() ++{ ++ const char *v = getenv("YP_PASSWD_HASH"); ++ if (!v) ++ return SHA_512; ++ ++ if (!strcasecmp(v, "DES")) ++ return DES; ++ ++ if (!strcasecmp(v, "SHA-256")) ++ return SHA_256; ++ ++ if (!strcasecmp(v, "MD5")) ++ return MD5; ++ ++ return SHA_512; ++} ++ ++ + int + main (int argc, char **argv) + { +@@ -723,6 +749,15 @@ main (int argc, char **argv) + + hash_id = get_hash_id (pwd->pw_passwd); + ++ /* If we use passwd.adjunct, there is no magic value like $1$ in the ++ * beginning of password, but ##username instead. Thus, SHA_512 will be ++ * used for hashing a new password by default. If we want to use DES, ++ * MD5 or SHA_256, we need to set the environment variable ++ * YP_PASSWD_HASH (e.g. YP_PASSWD_HASH=DES). ++ */ ++ if (strncmp(pwd->pw_passwd, "##", 2) == 0) ++ hash_id = get_env_hash_id(); ++ + /* Preserve 'rounds=$' (if present) in case of SHA-2 */ + if (hash_id == SHA_256 || hash_id == SHA_512) + { diff --git a/yp-tools.spec b/yp-tools.spec index c705a15..0b067b1 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 2.12 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2 Group: System Environment/Base Source: ftp://ftp.kernel.org/pub/linux/utils/net/NIS/yp-tools-%{version}.tar.bz2 @@ -9,6 +9,7 @@ Source: ftp://ftp.kernel.org/pub/linux/utils/net/NIS/yp-tools-%{version}.tar.bz2 Patch0: yp-tools-2.11-shadow.patch Patch1: yp-tools-2.12-typo.patch Patch2: yp-tools-2.12-gethost.patch +Patch3: yp-tools-2.12-hash.patch Url: http://www.linux-nis.org/nis/yp-tools/index.html Requires: ypbind @@ -37,6 +38,7 @@ you'll need to install the ypserv package on one machine on the network. %patch0 -p1 -b .shadow %patch1 -p1 -b .typo %patch2 -p1 -b .gethost +%patch3 -p1 -b .hash %build %configure --disable-domainname @@ -58,6 +60,11 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Fri Sep 09 2011 Honza Horak - 2.12-7 +- Added YP_PASSWD_HASH environment variable to set default + algorithm for hashing a new password + Resolves: #699666 + * Wed May 04 2011 Honza Horak - 2.12-6 - Applied -gethost patch to check return value (rhbz#698619) From 379be8cd72f6623d32f10847d7e3f792f71f1e70 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 14 Jan 2012 03:28:38 -0600 Subject: [PATCH 21/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild --- yp-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index 0b067b1..22136fc 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 2.12 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2 Group: System Environment/Base Source: ftp://ftp.kernel.org/pub/linux/utils/net/NIS/yp-tools-%{version}.tar.bz2 @@ -60,6 +60,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Sat Jan 14 2012 Fedora Release Engineering - 2.12-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + * Fri Sep 09 2011 Honza Horak - 2.12-7 - Added YP_PASSWD_HASH environment variable to set default algorithm for hashing a new password From 1604bf4577ed82fd40991d11c9ebaede1792c2e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Hor=C3=A1k?= Date: Mon, 23 Apr 2012 14:37:15 +0200 Subject: [PATCH 22/71] Patch from Paul Wouters to handle crypt() returning NULL Resolves: #814803 --- yp-tools-2.12-crypt.patch | 68 +++++++++++++++++++++++++++++++++++++++ yp-tools.spec | 8 ++++- 2 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 yp-tools-2.12-crypt.patch diff --git a/yp-tools-2.12-crypt.patch b/yp-tools-2.12-crypt.patch new file mode 100644 index 0000000..6d03d52 --- /dev/null +++ b/yp-tools-2.12-crypt.patch @@ -0,0 +1,68 @@ +diff -up yp-tools-2.12/src/yppasswd.c.crypt yp-tools-2.12/src/yppasswd.c +--- yp-tools-2.12/src/yppasswd.c.crypt 2012-04-23 13:01:35.599721168 +0200 ++++ yp-tools-2.12/src/yppasswd.c 2012-04-23 13:16:18.251261293 +0200 +@@ -448,13 +448,19 @@ verifypassword (struct passwd *pwd, char + } + + passwdlen = get_passwd_len (pwd->pw_passwd); +- if (pwd->pw_passwd[0] ++ if (pwd->pw_passwd[0] + && 0 != strcmp (pwd->pw_passwd, "x") /* don't check shadow passwords */ +- && !strncmp (pwd->pw_passwd, crypt (pwdstr, pwd->pw_passwd), passwdlen) + && uid) + { +- fputs (_("You cannot reuse the old password.\n"), stderr); +- return 0; ++ char *crypted = crypt(pwdstr, pwd->pw_passwd); ++ if(crypted == NULL) { ++ fputs (_("crypt() call failed.\n"), stderr); ++ return 0; ++ } ++ if(!strncmp (pwd->pw_passwd, crypted, passwdlen)) { ++ fputs (_("You cannot reuse the old password.\n"), stderr); ++ return 0; ++ } + } + + r = 0; +@@ -772,9 +778,16 @@ main (int argc, char **argv) + { + int passwdlen = get_passwd_len (pwd->pw_passwd); + char *sane_passwd = alloca (passwdlen + 1); ++ char *crypted; + strncpy (sane_passwd, pwd->pw_passwd, passwdlen); + sane_passwd[passwdlen] = 0; +- if (strcmp (crypt (s, sane_passwd), sane_passwd)) ++ crypted = crypt (s, sane_passwd); ++ if(crypted == NULL) ++ { ++ fprintf (stderr, _("Sorry - crypt() failed.\n")); ++ return 1; ++ } ++ if (strcmp (crypted, sane_passwd)) + { + fprintf (stderr, _("Sorry.\n")); + return 1; +@@ -789,6 +802,7 @@ main (int argc, char **argv) + char *error_msg; + #endif /* USE_CRACKLIB */ + char *buf, salt[37], *p = NULL; ++ char *crypted; + int tries = 0; + + buf = (char *) malloc (129); +@@ -869,7 +883,13 @@ main (int argc, char **argv) + break; + } + +- yppwd.newpw.pw_passwd = strdup (crypt (buf, salt)); ++ crypted = crypt (buf, salt); ++ if(crypted == NULL) { ++ fprintf (stderr, _("Sorry - crypt() failed.\n")); ++ return 1; ++ } else { ++ yppwd.newpw.pw_passwd = strdup (crypted); ++ } + } + + if (f_flag) diff --git a/yp-tools.spec b/yp-tools.spec index 22136fc..063a5ce 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 2.12 -Release: 8%{?dist} +Release: 9%{?dist} License: GPLv2 Group: System Environment/Base Source: ftp://ftp.kernel.org/pub/linux/utils/net/NIS/yp-tools-%{version}.tar.bz2 @@ -10,6 +10,7 @@ Patch0: yp-tools-2.11-shadow.patch 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 Url: http://www.linux-nis.org/nis/yp-tools/index.html Requires: ypbind @@ -39,6 +40,7 @@ you'll need to install the ypserv package on one machine on the network. %patch1 -p1 -b .typo %patch2 -p1 -b .gethost %patch3 -p1 -b .hash +%patch4 -p1 -b .crypt %build %configure --disable-domainname @@ -60,6 +62,10 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Mon Apr 23 2012 Honza Horak - 2.12-9 +- Patch from Paul Wouters to handle crypt() returning NULL + Resolves: #814803 + * Sat Jan 14 2012 Fedora Release Engineering - 2.12-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild From b8eaf289112eaa066fa81de21238749777a18855 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Hor=C3=A1k?= Date: Mon, 23 Apr 2012 14:39:21 +0200 Subject: [PATCH 23/71] 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(+) create mode 100644 yp-tools-2.12-adjunct.patch 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 - 2.12-9 +- Do not check old passwords using passwd.adjunct feature - Patch from Paul Wouters to handle crypt() returning NULL Resolves: #814803 From c04606903bc91c59414db9bfbc05fb8ef69d3de5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Hor=C3=A1k?= Date: Wed, 11 Jul 2012 16:26:10 +0200 Subject: [PATCH 24/71] Minor spec file fixes --- yp-tools.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/yp-tools.spec b/yp-tools.spec index de1c1e2..54a2f7d 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,10 +1,10 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 2.12 -Release: 9%{?dist} +Release: 10%{?dist} License: GPLv2 Group: System Environment/Base -Source: ftp://ftp.kernel.org/pub/linux/utils/net/NIS/yp-tools-%{version}.tar.bz2 +Source: http://www.linux-nis.org/download/yp-tools/yp-tools-%{version}.tar.bz2 # Not sent to upstream Patch0: yp-tools-2.11-shadow.patch Patch1: yp-tools-2.12-typo.patch @@ -64,6 +64,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Wed Jul 11 2012 Honza Horak - 2.12-10 +- Minor spec file fixes + * Mon Apr 23 2012 Honza Horak - 2.12-9 - Do not check old passwords using passwd.adjunct feature - Patch from Paul Wouters to handle crypt() returning NULL From 96c24da63b4caba2134ded6b563bb5cd5a8f1872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Hor=C3=A1k?= Date: Wed, 11 Jul 2012 16:30:02 +0200 Subject: [PATCH 25/71] Minor spec file fixes --- yp-tools.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yp-tools.spec b/yp-tools.spec index 54a2f7d..ad20194 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -58,9 +58,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install %defattr(-,root,root,-) %doc AUTHORS COPYING README ChangeLog NEWS etc/nsswitch.conf %doc THANKS TODO -/usr/bin/* +%{_bindir}/* %{_mandir}/*/* -/usr/sbin/* +%{_sbindir}/* /var/yp/nicknames %changelog From 61384f5443393aff26c36ccf2ab8ef3ba29caa2e Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sun, 22 Jul 2012 02:42:32 -0500 Subject: [PATCH 26/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild --- yp-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index ad20194..29dfebf 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 2.12 -Release: 10%{?dist} +Release: 11%{?dist} License: GPLv2 Group: System Environment/Base Source: http://www.linux-nis.org/download/yp-tools/yp-tools-%{version}.tar.bz2 @@ -64,6 +64,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Sun Jul 22 2012 Fedora Release Engineering - 2.12-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + * Wed Jul 11 2012 Honza Horak - 2.12-10 - Minor spec file fixes From 491df991d4695bd44d300fb0d19cb65f20cd866c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Hor=C3=A1k?= Date: Mon, 24 Sep 2012 12:50:50 +0200 Subject: [PATCH 27/71] Minor spec file fixes --- yp-tools.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/yp-tools.spec b/yp-tools.spec index 29dfebf..3001eac 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -49,13 +49,11 @@ you'll need to install the ypserv package on one machine on the network. make %install -rm -rf $RPM_BUILD_ROOT make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install %find_lang %name %files -f %{name}.lang -%defattr(-,root,root,-) %doc AUTHORS COPYING README ChangeLog NEWS etc/nsswitch.conf %doc THANKS TODO %{_bindir}/* @@ -64,6 +62,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Mon Sep 24 2012 Honza Horak - 2.12-12 +- Minor spec file fixes + * Sun Jul 22 2012 Fedora Release Engineering - 2.12-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild From d844e8318c4b7a7e4d57d913901ffcb7c665704e Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 14 Feb 2013 22:12:28 -0600 Subject: [PATCH 28/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild --- yp-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index 3001eac..1c354aa 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 2.12 -Release: 11%{?dist} +Release: 12%{?dist} License: GPLv2 Group: System Environment/Base Source: http://www.linux-nis.org/download/yp-tools/yp-tools-%{version}.tar.bz2 @@ -62,6 +62,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Fri Feb 15 2013 Fedora Release Engineering - 2.12-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + * Mon Sep 24 2012 Honza Horak - 2.12-12 - Minor spec file fixes From b945156ea7a436ae470ceefc6338739e9eba9fc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Hor=C3=A1k?= Date: Mon, 25 Mar 2013 17:03:08 +0100 Subject: [PATCH 29/71] Fix build for aarch64 --- yp-tools-gettext.patch | 12 ++++++++++++ yp-tools.spec | 8 +++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 yp-tools-gettext.patch diff --git a/yp-tools-gettext.patch b/yp-tools-gettext.patch new file mode 100644 index 0000000..69281f0 --- /dev/null +++ b/yp-tools-gettext.patch @@ -0,0 +1,12 @@ +diff -up yp-tools-2.12/configure.in.aarch2 yp-tools-2.12/configure.in +--- yp-tools-2.12/configure.in.aarch2 2010-04-21 11:57:29.000000000 +0200 ++++ yp-tools-2.12/configure.in 2013-03-25 16:56:59.131501212 +0100 +@@ -108,7 +108,7 @@ else + fi + + dnl internationalization macros +-AM_GNU_GETTEXT_VERSION ++AM_GNU_GETTEXT_VERSION(0.18) + AM_GNU_GETTEXT([external]) + + AC_OUTPUT([Makefile lib/Makefile src/Makefile man/Makefile diff --git a/yp-tools.spec b/yp-tools.spec index 1c354aa..9d72015 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 2.12 -Release: 12%{?dist} +Release: 13%{?dist} License: GPLv2 Group: System Environment/Base Source: http://www.linux-nis.org/download/yp-tools/yp-tools-%{version}.tar.bz2 @@ -12,6 +12,7 @@ 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 +Patch6: yp-tools-gettext.patch Url: http://www.linux-nis.org/nis/yp-tools/index.html Requires: ypbind @@ -43,6 +44,8 @@ you'll need to install the ypserv package on one machine on the network. %patch3 -p1 -b .hash %patch4 -p1 -b .crypt %patch5 -p1 -b .adjunct +%patch6 -p1 -b .gettext +autoreconf -i -f %build %configure --disable-domainname @@ -62,6 +65,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Mon Mar 25 2013 Honza Horak - 2.12-13 +- Fix build for aarch64 + * Fri Feb 15 2013 Fedora Release Engineering - 2.12-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild From 6311e5981a160681b05bf71d8db7e799e1bf6ff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Hor=C3=A1k?= Date: Mon, 25 Mar 2013 17:40:21 +0100 Subject: [PATCH 30/71] Adding autoconf to BuildRequires for autoreconf --- yp-tools.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/yp-tools.spec b/yp-tools.spec index 9d72015..6903a02 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -14,6 +14,7 @@ Patch4: yp-tools-2.12-crypt.patch Patch5: yp-tools-2.12-adjunct.patch Patch6: yp-tools-gettext.patch Url: http://www.linux-nis.org/nis/yp-tools/index.html +BuildRequires: autoconf Requires: ypbind %description From 029be6a36fc5cd81a59db65933ade6b550e8f3c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Hor=C3=A1k?= Date: Mon, 25 Mar 2013 18:28:49 +0100 Subject: [PATCH 31/71] Adding automake and gettext-devel to BuildRequires for autoreconf --- yp-tools.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index 6903a02..cde1ef4 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -14,7 +14,7 @@ Patch4: yp-tools-2.12-crypt.patch Patch5: yp-tools-2.12-adjunct.patch Patch6: yp-tools-gettext.patch Url: http://www.linux-nis.org/nis/yp-tools/index.html -BuildRequires: autoconf +BuildRequires: autoconf, automake, gettext-devel Requires: ypbind %description From 0ce13aa7589de68fc8952c02537ce8c95f31a234 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Hor=C3=A1k?= Date: Mon, 6 May 2013 22:43:43 +0200 Subject: [PATCH 32/71] New upstream version 2.14 --- .gitignore | 1 + sources | 2 +- yp-tools-2.11-shadow.patch | 6 +++--- yp-tools-2.12-gethost.patch | 33 --------------------------------- yp-tools-2.12-typo.patch | 12 ------------ yp-tools-gettext.patch | 12 ------------ yp-tools.spec | 13 +++++-------- 7 files changed, 10 insertions(+), 69 deletions(-) delete mode 100644 yp-tools-2.12-gethost.patch delete mode 100644 yp-tools-2.12-typo.patch delete mode 100644 yp-tools-gettext.patch diff --git a/.gitignore b/.gitignore index afd6fe0..c2fe9dc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ yp-tools-2.11.tar.bz2 /yp-tools-2.12.tar.bz2 +/yp-tools-2.14.tar.bz2 diff --git a/sources b/sources index f56cd79..7c8af04 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ce1e06d86caa285fa8cd76fdf103f51e yp-tools-2.12.tar.bz2 +ba1f121c17e3ad65368be173b977cd13 yp-tools-2.14.tar.bz2 diff --git a/yp-tools-2.11-shadow.patch b/yp-tools-2.11-shadow.patch index 1813ac4..b468824 100644 --- a/yp-tools-2.11-shadow.patch +++ b/yp-tools-2.11-shadow.patch @@ -1,6 +1,6 @@ -diff -up yp-tools-2.11/src/yppasswd.c.shadow yp-tools-2.11/src/yppasswd.c ---- yp-tools-2.11/src/yppasswd.c.shadow 2010-04-20 15:31:59.000000000 +0200 -+++ yp-tools-2.11/src/yppasswd.c 2010-11-19 18:37:14.931766315 +0100 +diff -up ./src/yppasswd.c.shadow ./src/yppasswd.c +--- ./src/yppasswd.c.shadow 2010-04-21 11:24:15.000000000 +0200 ++++ ./src/yppasswd.c 2013-05-06 22:31:39.984229577 +0200 @@ -449,6 +449,7 @@ verifypassword (struct passwd *pwd, char passwdlen = get_passwd_len (pwd->pw_passwd); diff --git a/yp-tools-2.12-gethost.patch b/yp-tools-2.12-gethost.patch deleted file mode 100644 index afe782d..0000000 --- a/yp-tools-2.12-gethost.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -up yp-tools-2.12/src/yppoll.c.gethost yp-tools-2.12/src/yppoll.c ---- yp-tools-2.12/src/yppoll.c.gethost 2001-12-08 20:59:10.000000000 +0100 -+++ yp-tools-2.12/src/yppoll.c 2011-05-04 16:18:08.371772310 +0200 -@@ -218,7 +218,10 @@ main (int argc, char **argv) - - hent = gethostbyaddr ((char *)&clnt_saddr.sin_addr.s_addr, - sizeof (clnt_saddr.sin_addr.s_addr), AF_INET); -- hostname = strdup (hent->h_name); -+ if (hent) -+ { -+ hostname = strdup (hent->h_name); -+ } - } - else - { -@@ -261,7 +264,7 @@ main (int argc, char **argv) - &clnt_sock); - if (client == NULL) - { -- fprintf (stderr, _("Can't create connection to %s.\n"), hostname); -+ fprintf (stderr, _("Can't create connection to %s.\n"), hostname ? hostname : "unknown"); - return 1; - } - -@@ -279,7 +282,7 @@ main (int argc, char **argv) - if (clnt_res != TRUE) - { - fprintf (stdout, _("Domain %s is not supported by %s.\n"), domainname, -- hostname); -+ hostname ? hostname : "unknown"); - return 1; - } - diff --git a/yp-tools-2.12-typo.patch b/yp-tools-2.12-typo.patch deleted file mode 100644 index 68ff90a..0000000 --- a/yp-tools-2.12-typo.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up yp-tools-2.12/man/ypmatch.1.in.typo yp-tools-2.12/man/ypmatch.1.in ---- yp-tools-2.12/man/ypmatch.1.in.typo 2011-03-18 13:43:29.462662847 +0100 -+++ yp-tools-2.12/man/ypmatch.1.in 2011-03-18 13:44:26.498770766 +0100 -@@ -5,7 +5,7 @@ - .\" - .\" This program is free software; you can redistribute it and/or modify - .\" it under the terms of the GNU General Public License version 2 as --.\" published bythe Free Software Foundation. -+.\" published by the Free Software Foundation. - .\" - .\" This program is distributed in the hope that it will be useful, - .\" but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/yp-tools-gettext.patch b/yp-tools-gettext.patch deleted file mode 100644 index 69281f0..0000000 --- a/yp-tools-gettext.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up yp-tools-2.12/configure.in.aarch2 yp-tools-2.12/configure.in ---- yp-tools-2.12/configure.in.aarch2 2010-04-21 11:57:29.000000000 +0200 -+++ yp-tools-2.12/configure.in 2013-03-25 16:56:59.131501212 +0100 -@@ -108,7 +108,7 @@ else - fi - - dnl internationalization macros --AM_GNU_GETTEXT_VERSION -+AM_GNU_GETTEXT_VERSION(0.18) - AM_GNU_GETTEXT([external]) - - AC_OUTPUT([Makefile lib/Makefile src/Makefile man/Makefile diff --git a/yp-tools.spec b/yp-tools.spec index cde1ef4..44705e0 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,18 +1,15 @@ Summary: NIS (or YP) client programs Name: yp-tools -Version: 2.12 -Release: 13%{?dist} +Version: 2.14 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Base Source: http://www.linux-nis.org/download/yp-tools/yp-tools-%{version}.tar.bz2 # Not sent to upstream Patch0: yp-tools-2.11-shadow.patch -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 -Patch6: yp-tools-gettext.patch Url: http://www.linux-nis.org/nis/yp-tools/index.html BuildRequires: autoconf, automake, gettext-devel Requires: ypbind @@ -40,12 +37,9 @@ you'll need to install the ypserv package on one machine on the network. %prep %setup -q %patch0 -p1 -b .shadow -%patch1 -p1 -b .typo -%patch2 -p1 -b .gethost %patch3 -p1 -b .hash %patch4 -p1 -b .crypt %patch5 -p1 -b .adjunct -%patch6 -p1 -b .gettext autoreconf -i -f %build @@ -66,6 +60,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Mon May 06 2013 Honza Horak - 2.14-1 +- New upstream version 2.14 + * Mon Mar 25 2013 Honza Horak - 2.12-13 - Fix build for aarch64 From 74c8a1f39ceb51c2bae4d901dd1e3761460d0210 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sun, 4 Aug 2013 04:35:45 -0500 Subject: [PATCH 33/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild --- yp-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index 44705e0..e695db8 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 2.14 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Base Source: http://www.linux-nis.org/download/yp-tools/yp-tools-%{version}.tar.bz2 @@ -60,6 +60,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Sun Aug 04 2013 Fedora Release Engineering - 2.14-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + * Mon May 06 2013 Honza Horak - 2.14-1 - New upstream version 2.14 From eed06f262171208d27e798304af7152ce6ba2d8b Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 7 Jun 2014 12:50:48 -0500 Subject: [PATCH 34/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- yp-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index e695db8..036cdb0 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 2.14 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Group: System Environment/Base Source: http://www.linux-nis.org/download/yp-tools/yp-tools-%{version}.tar.bz2 @@ -60,6 +60,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Sat Jun 07 2014 Fedora Release Engineering - 2.14-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Sun Aug 04 2013 Fedora Release Engineering - 2.14-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild From 9110c6134e724a50042af6d61cf96b16cd533701 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Mon, 18 Aug 2014 11:23:28 +0000 Subject: [PATCH 35/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- yp-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index 036cdb0..3946d74 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 2.14 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 Group: System Environment/Base Source: http://www.linux-nis.org/download/yp-tools/yp-tools-%{version}.tar.bz2 @@ -60,6 +60,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Mon Aug 18 2014 Fedora Release Engineering - 2.14-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Sat Jun 07 2014 Fedora Release Engineering - 2.14-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild From 3503e8edf7e076784e44e42825f91919b7399433 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 19 Jun 2015 04:38:08 +0000 Subject: [PATCH 36/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- yp-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index 3946d74..b671a59 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 2.14 -Release: 4%{?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,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Fri Jun 19 2015 Fedora Release Engineering - 2.14-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Mon Aug 18 2014 Fedora Release Engineering - 2.14-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From 3542e5e4c7f607d91323149e1f32ef9a2efd9735 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 5 Feb 2016 03:58:58 +0000 Subject: [PATCH 37/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- yp-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index b671a59..8e18abc 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 2.14 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2 Group: System Environment/Base Source: http://www.linux-nis.org/download/yp-tools/yp-tools-%{version}.tar.bz2 @@ -60,6 +60,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Fri Feb 05 2016 Fedora Release Engineering - 2.14-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Fri Jun 19 2015 Fedora Release Engineering - 2.14-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild From 68801fc7e27e147b9d712ac3a3a5f517eac8ded6 Mon Sep 17 00:00:00 2001 From: Petr Kubat Date: Mon, 28 Nov 2016 14:14:30 +0100 Subject: [PATCH 38/71] Fix yppasswd password check when using passwd.adjunct Patch by Gilbert E. Detillieux Resolves: 1297955 --- yp-tools-2.12-adjunct.patch | 15 +++++++++++---- yp-tools.spec | 5 ++++- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/yp-tools-2.12-adjunct.patch b/yp-tools-2.12-adjunct.patch index b1dd02d..01cda7e 100644 --- a/yp-tools-2.12-adjunct.patch +++ b/yp-tools-2.12-adjunct.patch @@ -1,12 +1,19 @@ 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 - +@@ -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/yp-tools.spec b/yp-tools.spec index 8e18abc..60aeee8 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 2.14 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2 Group: System Environment/Base Source: http://www.linux-nis.org/download/yp-tools/yp-tools-%{version}.tar.bz2 @@ -60,6 +60,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Mon Nov 28 2016 Petr Kubat - 2.14-7 +- Modified passwd.adjunct patch by Gilbert E. Detillieux (#1297955) + * Fri Feb 05 2016 Fedora Release Engineering - 2.14-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From 57c1a16e873be3b7df07f5a78fbe16e908f1215f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 11 Feb 2017 18:17:36 +0000 Subject: [PATCH 39/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- yp-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index 60aeee8..ba3357c 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 2.14 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2 Group: System Environment/Base Source: http://www.linux-nis.org/download/yp-tools/yp-tools-%{version}.tar.bz2 @@ -60,6 +60,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Sat Feb 11 2017 Fedora Release Engineering - 2.14-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Mon Nov 28 2016 Petr Kubat - 2.14-7 - Modified passwd.adjunct patch by Gilbert E. Detillieux (#1297955) From 996e4bef29f040466e0a69c612201ee7ea0ab93b Mon Sep 17 00:00:00 2001 From: Matej Muzila Date: Fri, 19 May 2017 16:44:34 +0200 Subject: [PATCH 40/71] Update to version 4.2.2 supporting IPv6 --- .gitignore | 3 + sources | 2 +- yp-tools-2.12-crypt.patch | 24 -------- yp-tools-3.3-add_mapv4v6addr.h.patch | 85 ++++++++++++++++++++++++++ yp-tools-3.3-headers.patch | 16 +++++ yp-tools-3.3-no-nss-nis6.patch | 24 ++++++++ yp-tools-4.2.2-strict-prototypes.patch | 11 ++++ yp-tools.spec | 49 +++++++++++---- 8 files changed, 178 insertions(+), 36 deletions(-) create mode 100644 yp-tools-3.3-add_mapv4v6addr.h.patch create mode 100644 yp-tools-3.3-headers.patch create mode 100644 yp-tools-3.3-no-nss-nis6.patch create mode 100644 yp-tools-4.2.2-strict-prototypes.patch diff --git a/.gitignore b/.gitignore index c2fe9dc..51f2cd2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ yp-tools-2.11.tar.bz2 /yp-tools-2.12.tar.bz2 /yp-tools-2.14.tar.bz2 +/yp-tools-3.0.1.tar.bz2 +/yp-tools-3.3.tar.bz2 +/yp-tools-yp-tools-4.2.2.tar.gz diff --git a/sources b/sources index 7c8af04..33928cd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ba1f121c17e3ad65368be173b977cd13 yp-tools-2.14.tar.bz2 +SHA512 (yp-tools-yp-tools-4.2.2.tar.gz) = da60b1be08432f61789cbd62a491996f47bfcbe296723d1984b4d0d2e755022e40e682cfd779597008c823e7fca2f115d85d446893f2b8ce001aba5744c2cfce diff --git a/yp-tools-2.12-crypt.patch b/yp-tools-2.12-crypt.patch index 6d03d52..5e8ca41 100644 --- a/yp-tools-2.12-crypt.patch +++ b/yp-tools-2.12-crypt.patch @@ -1,30 +1,6 @@ diff -up yp-tools-2.12/src/yppasswd.c.crypt yp-tools-2.12/src/yppasswd.c --- yp-tools-2.12/src/yppasswd.c.crypt 2012-04-23 13:01:35.599721168 +0200 +++ yp-tools-2.12/src/yppasswd.c 2012-04-23 13:16:18.251261293 +0200 -@@ -448,13 +448,19 @@ verifypassword (struct passwd *pwd, char - } - - passwdlen = get_passwd_len (pwd->pw_passwd); -- if (pwd->pw_passwd[0] -+ if (pwd->pw_passwd[0] - && 0 != strcmp (pwd->pw_passwd, "x") /* don't check shadow passwords */ -- && !strncmp (pwd->pw_passwd, crypt (pwdstr, pwd->pw_passwd), passwdlen) - && uid) - { -- fputs (_("You cannot reuse the old password.\n"), stderr); -- return 0; -+ char *crypted = crypt(pwdstr, pwd->pw_passwd); -+ if(crypted == NULL) { -+ fputs (_("crypt() call failed.\n"), stderr); -+ return 0; -+ } -+ if(!strncmp (pwd->pw_passwd, crypted, passwdlen)) { -+ fputs (_("You cannot reuse the old password.\n"), stderr); -+ return 0; -+ } - } - - r = 0; @@ -772,9 +778,16 @@ main (int argc, char **argv) { int passwdlen = get_passwd_len (pwd->pw_passwd); diff --git a/yp-tools-3.3-add_mapv4v6addr.h.patch b/yp-tools-3.3-add_mapv4v6addr.h.patch new file mode 100644 index 0000000..f998460 --- /dev/null +++ b/yp-tools-3.3-add_mapv4v6addr.h.patch @@ -0,0 +1,85 @@ +diff -ruN yp-tools-3.3/nss_nis6/mapv4v6addr.h yp-tools-3.3-new/nss_nis6/mapv4v6addr.h +--- yp-tools-3.3/nss_nis6/mapv4v6addr.h 1970-01-01 01:00:00.000000000 +0100 ++++ yp-tools-3.3-new/nss_nis6/mapv4v6addr.h 2014-12-17 16:42:58.983438634 +0100 +@@ -0,0 +1,69 @@ ++/* ++ * ++Copyright++ 1985, 1988, 1993 ++ * - ++ * Copyright (c) 1985, 1988, 1993 ++ * The Regents of the University of California. All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * 4. Neither the name of the University nor the names of its contributors ++ * may be used to endorse or promote products derived from this software ++ * without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE ++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ++ * SUCH DAMAGE. ++ * - ++ * Portions Copyright (c) 1993 by Digital Equipment Corporation. ++ * ++ * Permission to use, copy, modify, and distribute this software for any ++ * purpose with or without fee is hereby granted, provided that the above ++ * copyright notice and this permission notice appear in all copies, and that ++ * the name of Digital Equipment Corporation not be used in advertising or ++ * publicity pertaining to distribution of the document or software without ++ * specific, written prior permission. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL ++ * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES ++ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT ++ * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL ++ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ++ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ++ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS ++ * SOFTWARE. ++ * - ++ * --Copyright-- ++ */ ++ ++#include ++#include ++ ++static void ++map_v4v6_address (const char *src, char *dst) ++{ ++ u_char *p = (u_char *) dst; ++ int i; ++ ++ /* Move the IPv4 part to the right position. */ ++ memcpy (dst + 12, src, INADDRSZ); ++ ++ /* Mark this ipv6 addr as a mapped ipv4. */ ++ for (i = 0; i < 10; i++) ++ *p++ = 0x00; ++ *p++ = 0xff; ++ *p = 0xff; ++} +diff -ruN yp-tools-3.3/nss_nis6/nis-hosts.c yp-tools-3.3-new/nss_nis6/nis-hosts.c +--- yp-tools-3.3/nss_nis6/nis-hosts.c 2014-10-29 15:28:02.000000000 +0100 ++++ yp-tools-3.3-new/nss_nis6/nis-hosts.c 2014-12-17 16:43:46.308339552 +0100 +@@ -36,7 +36,7 @@ + #include "nss-nis6.h" + + /* Get implementation for some internal functions. */ +-#include ++#include + + #define ENTNAME hostent + #define DATABASE "hosts" diff --git a/yp-tools-3.3-headers.patch b/yp-tools-3.3-headers.patch new file mode 100644 index 0000000..a0af088 --- /dev/null +++ b/yp-tools-3.3-headers.patch @@ -0,0 +1,16 @@ +diff -rup yp-tools-3.3-orig/lib/yp_xdr.c yp-tools-3.3/lib/yp_xdr.c +--- yp-tools-3.3-orig/lib/yp_xdr.c 2014-10-31 14:00:08.000000000 +0100 ++++ yp-tools-3.3/lib/yp_xdr.c 2015-04-15 15:53:29.854511186 +0200 +@@ -45,9 +45,9 @@ + #define XDRMAXRECORD (16 * 1024 * 1024) + + bool_t +-xdr_ypstat (XDR *xdrs, ypstat *objp) ++xdr_ypstat (XDR *xdrs, enum ypbind_resptype * __objp) + { +- return xdr_enum (xdrs, (enum_t *) objp); ++ return xdr_enum (xdrs, (enum_t *) __objp); + } + + bool_t +Only in yp-tools-3.3/lib: .yp_xdr.c.swp diff --git a/yp-tools-3.3-no-nss-nis6.patch b/yp-tools-3.3-no-nss-nis6.patch new file mode 100644 index 0000000..5abab57 --- /dev/null +++ b/yp-tools-3.3-no-nss-nis6.patch @@ -0,0 +1,24 @@ +diff -ru yp-tools-3.3-orig/Makefile.am yp-tools-3.3/Makefile.am +--- yp-tools-3.3-orig/Makefile.am 2014-10-29 15:28:02.000000000 +0100 ++++ yp-tools-3.3/Makefile.am 2014-12-10 18:47:11.864137423 +0100 +@@ -5,7 +5,7 @@ + # + AUTOMAKE_OPTIONS = 1.5 gnits dist-bzip2 + # +-SUBDIRS = lib src nss_nis6 po man etc ++SUBDIRS = lib src po man etc + + CLEANFILES = *~ + +diff -ru yp-tools-3.3-orig/Makefile.in yp-tools-3.3/Makefile.in +--- yp-tools-3.3-orig/Makefile.in 2014-12-05 12:44:37.000000000 +0100 ++++ yp-tools-3.3/Makefile.in 2014-12-10 18:16:20.996550012 +0100 +@@ -382,7 +382,7 @@ + # + AUTOMAKE_OPTIONS = 1.5 gnits dist-bzip2 + # +-SUBDIRS = lib src nss_nis6 po man etc ++SUBDIRS = lib src po man etc + CLEANFILES = *~ + ACLOCAL_AMFLAGS = -I m4 + M4_FILES = m4/getline.m4 diff --git a/yp-tools-4.2.2-strict-prototypes.patch b/yp-tools-4.2.2-strict-prototypes.patch new file mode 100644 index 0000000..546eb6a --- /dev/null +++ b/yp-tools-4.2.2-strict-prototypes.patch @@ -0,0 +1,11 @@ +--- yp-tools-yp-tools-4.2.2/src/yppasswd.c.strict-protorypes 2017-02-21 15:51:03.452034055 +0100 ++++ yp-tools-yp-tools-4.2.2/src/yppasswd.c 2017-02-21 15:51:14.996030455 +0100 +@@ -547,7 +547,7 @@ create_random_salt (char *salt, int num_ + * If other value is set or it is not set at all, SHA-512 is used. + */ + static int +-get_env_hash_id() ++get_env_hash_id(void) + { + const char *v = getenv("YP_PASSWD_HASH"); + if (!v) diff --git a/yp-tools.spec b/yp-tools.spec index 3946d74..11f4e58 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,22 +1,28 @@ Summary: NIS (or YP) client programs Name: yp-tools -Version: 2.14 -Release: 4%{?dist} +Version: 4.2.2 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Base -Source: http://www.linux-nis.org/download/yp-tools/yp-tools-%{version}.tar.bz2 +Source: http://www.linux-nis.org/download/yp-tools/yp-tools-yp-tools-%{version}.tar.gz # Not sent to upstream Patch0: yp-tools-2.11-shadow.patch Patch3: yp-tools-2.12-hash.patch Patch4: yp-tools-2.12-crypt.patch Patch5: yp-tools-2.12-adjunct.patch +Patch6: yp-tools-3.3-add_mapv4v6addr.h.patch +Patch7: yp-tools-3.3-headers.patch +Patch8: yp-tools-4.2.2-strict-prototypes.patch Url: http://www.linux-nis.org/nis/yp-tools/index.html -BuildRequires: autoconf, automake, gettext-devel +BuildRequires: autoconf, automake, gettext-devel, libtool, libtirpc-devel, libnsl2-devel Requires: ypbind +Requires: glibc + +%global __filter_GLIBC_PRIVATE 1 %description The Network Information Service (NIS) is a system which provides -network information (login names, passwords, home directories, group +network information (login names, passwords, home directories, groupinformation) to all of the machines on a network. NIS can enable information) to all of the machines on a network. NIS can enable users to login on any machine on the network, as long as the machine has the NIS client programs running and the user's password is @@ -34,17 +40,33 @@ on your network. You will also need to install the ypbind package on every machine running NIS client programs. If you need an NIS server, you'll need to install the ypserv package on one machine on the network. +%package devel +Summary: NIS (or YP) client programs +Group: System Environment/Base +Requires: yp-tools + +%description devel +Install yp-tools-devel package for developing applications that use yp-tools + + %prep -%setup -q -%patch0 -p1 -b .shadow +%setup -q -n %{name}-%{name}-%{version} +#%patch0 -p1 -b .shadow %patch3 -p1 -b .hash %patch4 -p1 -b .crypt -%patch5 -p1 -b .adjunct -autoreconf -i -f +#%patch5 -p1 -b .adjunct +%patch8 -p1 -b .strict-prototypes + + +autoreconf -i -f -v %build + +export CFLAGS="$CFLAGS %{optflags}" + %configure --disable-domainname -make + +%make_build %install make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install @@ -53,13 +75,18 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install %files -f %{name}.lang %doc AUTHORS COPYING README ChangeLog NEWS etc/nsswitch.conf -%doc THANKS TODO +%doc THANKS %{_bindir}/* + + %{_mandir}/*/* %{_sbindir}/* /var/yp/nicknames %changelog +* Fri May 19 2017 Matej Mužila - 4.2.2-1 +- Update to version 4.2.2 supporting IPv6 + * Mon Aug 18 2014 Fedora Release Engineering - 2.14-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From dcf95b732f3191937d2f9f19f5c435b1c6e63403 Mon Sep 17 00:00:00 2001 From: Matej Muzila Date: Mon, 29 May 2017 16:12:58 +0200 Subject: [PATCH 41/71] Require ypbind >= 3:2.4-2 --- yp-tools.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/yp-tools.spec b/yp-tools.spec index 706e4ee..13e72fc 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 4.2.2 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Base Source: http://www.linux-nis.org/download/yp-tools/yp-tools-yp-tools-%{version}.tar.gz @@ -15,7 +15,7 @@ Patch7: yp-tools-3.3-headers.patch Patch8: yp-tools-4.2.2-strict-prototypes.patch Url: http://www.linux-nis.org/nis/yp-tools/index.html BuildRequires: autoconf, automake, gettext-devel, libtool, libtirpc-devel, libnsl2-devel -Requires: ypbind +Requires: ypbind >= 3:2.4-2 Requires: glibc %global __filter_GLIBC_PRIVATE 1 @@ -84,6 +84,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Mon May 29 2017 Matej Mužila - 4.2.2-2 +- Require ypbind >= 3:2.4-2 + * Fri May 19 2017 Matej Mužila - 4.2.2-1 - Update to version 4.2.2 supporting IPv6 From 9d87276f7b1d1cfa871c4c9ea2ef6b213a65a8c3 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 27 Jul 2017 22:35:59 +0000 Subject: [PATCH 42/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- yp-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index 13e72fc..ea009ac 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 4.2.2 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Group: System Environment/Base Source: http://www.linux-nis.org/download/yp-tools/yp-tools-yp-tools-%{version}.tar.gz @@ -84,6 +84,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Thu Jul 27 2017 Fedora Release Engineering - 4.2.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Mon May 29 2017 Matej Mužila - 4.2.2-2 - Require ypbind >= 3:2.4-2 From 4536be56fa3d943dfb763777da5e71ed8fa9cf09 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 3 Aug 2017 11:06:15 +0000 Subject: [PATCH 43/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild --- yp-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index ea009ac..8436fca 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 4.2.2 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 Group: System Environment/Base Source: http://www.linux-nis.org/download/yp-tools/yp-tools-yp-tools-%{version}.tar.gz @@ -84,6 +84,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Thu Aug 03 2017 Fedora Release Engineering - 4.2.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + * Thu Jul 27 2017 Fedora Release Engineering - 4.2.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From dbeb79db34f2b9c52d602e8adf6b9aeee4c34272 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Sat, 20 Jan 2018 23:08:47 +0100 Subject: [PATCH 44/71] Rebuilt for switch to libxcrypt --- yp-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index 8436fca..1fc9485 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 4.2.2 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2 Group: System Environment/Base Source: http://www.linux-nis.org/download/yp-tools/yp-tools-yp-tools-%{version}.tar.gz @@ -84,6 +84,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Sat Jan 20 2018 Björn Esser - 4.2.2-5 +- Rebuilt for switch to libxcrypt + * Thu Aug 03 2017 Fedora Release Engineering - 4.2.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild From 7fe6b961d581c498974a79308942cf8f77d934de Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 9 Feb 2018 22:18:46 +0000 Subject: [PATCH 45/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- yp-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index 1fc9485..f0a5459 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 4.2.2 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2 Group: System Environment/Base Source: http://www.linux-nis.org/download/yp-tools/yp-tools-yp-tools-%{version}.tar.gz @@ -84,6 +84,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Fri Feb 09 2018 Fedora Release Engineering - 4.2.2-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Sat Jan 20 2018 Björn Esser - 4.2.2-5 - Rebuilt for switch to libxcrypt From 876215746b6b89ae293a34dbe8c924d849937cc0 Mon Sep 17 00:00:00 2001 From: Matej Muzila Date: Thu, 15 Mar 2018 16:37:58 +0100 Subject: [PATCH 46/71] Disable cast-function-type warning --- yp-tools.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/yp-tools.spec b/yp-tools.spec index f0a5459..6a4a91a 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 4.2.2 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2 Group: System Environment/Base Source: http://www.linux-nis.org/download/yp-tools/yp-tools-yp-tools-%{version}.tar.gz @@ -62,7 +62,7 @@ autoreconf -i -f -v %build -export CFLAGS="$CFLAGS %{optflags}" +export CFLAGS="$CFLAGS %{optflags} -Wno-cast-function-type" %configure --disable-domainname @@ -84,6 +84,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Thu Mar 15 2018 Matej Mužila - 4.2.2-7 +- Disable cast-function-type warning + * Fri Feb 09 2018 Fedora Release Engineering - 4.2.2-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From 6b4c7dfb86e72fd37de023ac323055a6ce7a5670 Mon Sep 17 00:00:00 2001 From: Petr Kubat Date: Thu, 19 Apr 2018 14:28:58 +0200 Subject: [PATCH 47/71] Update to version 4.2.3 --- .gitignore | 1 + sources | 2 +- yp-tools-2.11-shadow.patch | 11 ---- yp-tools-2.12-adjunct.patch | 8 --- yp-tools-3.3-add_mapv4v6addr.h.patch | 85 ---------------------------- yp-tools-3.3-headers.patch | 16 ------ yp-tools.spec | 32 +++++------ 7 files changed, 17 insertions(+), 138 deletions(-) delete mode 100644 yp-tools-2.11-shadow.patch delete mode 100644 yp-tools-3.3-add_mapv4v6addr.h.patch delete mode 100644 yp-tools-3.3-headers.patch diff --git a/.gitignore b/.gitignore index 51f2cd2..fae6099 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ yp-tools-2.11.tar.bz2 /yp-tools-3.0.1.tar.bz2 /yp-tools-3.3.tar.bz2 /yp-tools-yp-tools-4.2.2.tar.gz +/v4.2.3.tar.gz diff --git a/sources b/sources index 33928cd..1320751 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (yp-tools-yp-tools-4.2.2.tar.gz) = da60b1be08432f61789cbd62a491996f47bfcbe296723d1984b4d0d2e755022e40e682cfd779597008c823e7fca2f115d85d446893f2b8ce001aba5744c2cfce +SHA512 (v4.2.3.tar.gz) = 2fcdaaeb8af4c3f62aa571a488c04561356681fc18b919ef728cfc1941578870cce74b136959f49e4ab04f988a79252163c1abe30b357788cb0b5faca7b5d147 diff --git a/yp-tools-2.11-shadow.patch b/yp-tools-2.11-shadow.patch deleted file mode 100644 index b468824..0000000 --- a/yp-tools-2.11-shadow.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up ./src/yppasswd.c.shadow ./src/yppasswd.c ---- ./src/yppasswd.c.shadow 2010-04-21 11:24:15.000000000 +0200 -+++ ./src/yppasswd.c 2013-05-06 22:31:39.984229577 +0200 -@@ -449,6 +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 */ - && !strncmp (pwd->pw_passwd, crypt (pwdstr, pwd->pw_passwd), passwdlen) - && uid) - { diff --git a/yp-tools-2.12-adjunct.patch b/yp-tools-2.12-adjunct.patch index 01cda7e..a32b69d 100644 --- a/yp-tools-2.12-adjunct.patch +++ b/yp-tools-2.12-adjunct.patch @@ -1,14 +1,6 @@ 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 -@@ -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 != 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 */ diff --git a/yp-tools-3.3-add_mapv4v6addr.h.patch b/yp-tools-3.3-add_mapv4v6addr.h.patch deleted file mode 100644 index f998460..0000000 --- a/yp-tools-3.3-add_mapv4v6addr.h.patch +++ /dev/null @@ -1,85 +0,0 @@ -diff -ruN yp-tools-3.3/nss_nis6/mapv4v6addr.h yp-tools-3.3-new/nss_nis6/mapv4v6addr.h ---- yp-tools-3.3/nss_nis6/mapv4v6addr.h 1970-01-01 01:00:00.000000000 +0100 -+++ yp-tools-3.3-new/nss_nis6/mapv4v6addr.h 2014-12-17 16:42:58.983438634 +0100 -@@ -0,0 +1,69 @@ -+/* -+ * ++Copyright++ 1985, 1988, 1993 -+ * - -+ * Copyright (c) 1985, 1988, 1993 -+ * The Regents of the University of California. All rights reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * 1. Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * 2. Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in the -+ * documentation and/or other materials provided with the distribution. -+ * 4. Neither the name of the University nor the names of its contributors -+ * may be used to endorse or promote products derived from this software -+ * without specific prior written permission. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -+ * SUCH DAMAGE. -+ * - -+ * Portions Copyright (c) 1993 by Digital Equipment Corporation. -+ * -+ * Permission to use, copy, modify, and distribute this software for any -+ * purpose with or without fee is hereby granted, provided that the above -+ * copyright notice and this permission notice appear in all copies, and that -+ * the name of Digital Equipment Corporation not be used in advertising or -+ * publicity pertaining to distribution of the document or software without -+ * specific, written prior permission. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL -+ * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES -+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT -+ * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL -+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR -+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS -+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -+ * SOFTWARE. -+ * - -+ * --Copyright-- -+ */ -+ -+#include -+#include -+ -+static void -+map_v4v6_address (const char *src, char *dst) -+{ -+ u_char *p = (u_char *) dst; -+ int i; -+ -+ /* Move the IPv4 part to the right position. */ -+ memcpy (dst + 12, src, INADDRSZ); -+ -+ /* Mark this ipv6 addr as a mapped ipv4. */ -+ for (i = 0; i < 10; i++) -+ *p++ = 0x00; -+ *p++ = 0xff; -+ *p = 0xff; -+} -diff -ruN yp-tools-3.3/nss_nis6/nis-hosts.c yp-tools-3.3-new/nss_nis6/nis-hosts.c ---- yp-tools-3.3/nss_nis6/nis-hosts.c 2014-10-29 15:28:02.000000000 +0100 -+++ yp-tools-3.3-new/nss_nis6/nis-hosts.c 2014-12-17 16:43:46.308339552 +0100 -@@ -36,7 +36,7 @@ - #include "nss-nis6.h" - - /* Get implementation for some internal functions. */ --#include -+#include - - #define ENTNAME hostent - #define DATABASE "hosts" diff --git a/yp-tools-3.3-headers.patch b/yp-tools-3.3-headers.patch deleted file mode 100644 index a0af088..0000000 --- a/yp-tools-3.3-headers.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -rup yp-tools-3.3-orig/lib/yp_xdr.c yp-tools-3.3/lib/yp_xdr.c ---- yp-tools-3.3-orig/lib/yp_xdr.c 2014-10-31 14:00:08.000000000 +0100 -+++ yp-tools-3.3/lib/yp_xdr.c 2015-04-15 15:53:29.854511186 +0200 -@@ -45,9 +45,9 @@ - #define XDRMAXRECORD (16 * 1024 * 1024) - - bool_t --xdr_ypstat (XDR *xdrs, ypstat *objp) -+xdr_ypstat (XDR *xdrs, enum ypbind_resptype * __objp) - { -- return xdr_enum (xdrs, (enum_t *) objp); -+ return xdr_enum (xdrs, (enum_t *) __objp); - } - - bool_t -Only in yp-tools-3.3/lib: .yp_xdr.c.swp diff --git a/yp-tools.spec b/yp-tools.spec index 6a4a91a..ba87cf5 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,18 +1,14 @@ Summary: NIS (or YP) client programs Name: yp-tools -Version: 4.2.2 -Release: 7%{?dist} +Version: 4.2.3 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Base -Source: http://www.linux-nis.org/download/yp-tools/yp-tools-yp-tools-%{version}.tar.gz -# Not sent to upstream -Patch0: yp-tools-2.11-shadow.patch -Patch3: yp-tools-2.12-hash.patch -Patch4: yp-tools-2.12-crypt.patch -Patch5: yp-tools-2.12-adjunct.patch -Patch6: yp-tools-3.3-add_mapv4v6addr.h.patch -Patch7: yp-tools-3.3-headers.patch -Patch8: yp-tools-4.2.2-strict-prototypes.patch +Source: https://github.com/thkukuk/yp-tools/archive/v%{version}.tar.gz +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 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 @@ -50,12 +46,11 @@ Install yp-tools-devel package for developing applications that use yp-tools %prep -%setup -q -n %{name}-%{name}-%{version} -#%patch0 -p1 -b .shadow -%patch3 -p1 -b .hash -%patch4 -p1 -b .crypt -#%patch5 -p1 -b .adjunct -%patch8 -p1 -b .strict-prototypes +%setup -q -n %{name}-%{version} +%patch1 -p1 -b .hash +%patch2 -p1 -b .crypt +%patch3 -p1 -b .adjunct +%patch4 -p1 -b .strict-prototypes autoreconf -i -f -v @@ -84,6 +79,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Thu Apr 19 2018 Petr Kubat - 4.2.3-1 +- Update to version 4.2.3 + * Thu Mar 15 2018 Matej Mužila - 4.2.2-7 - Disable cast-function-type warning From 2f1f7e42622998345bb9bc76d49d1986075a9751 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 14 Jul 2018 09:43:47 +0000 Subject: [PATCH 48/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- yp-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index ba87cf5..1eb776c 100644 --- a/yp-tools.spec +++ b/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 @@ -79,6 +79,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Sat Jul 14 2018 Fedora Release Engineering - 4.2.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Thu Apr 19 2018 Petr Kubat - 4.2.3-1 - Update to version 4.2.3 From e5ff945d65863e6cde941dd6f6369436be1a7f46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Mon, 14 Jan 2019 19:20:33 +0100 Subject: [PATCH 49/71] Rebuilt for libcrypt.so.2 (#1666033) --- yp-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index 1eb776c..67ef4d6 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 4.2.3 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Group: System Environment/Base Source: https://github.com/thkukuk/yp-tools/archive/v%{version}.tar.gz @@ -79,6 +79,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Mon Jan 14 2019 Björn Esser - 4.2.3-3 +- Rebuilt for libcrypt.so.2 (#1666033) + * Sat Jul 14 2018 Fedora Release Engineering - 4.2.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From f1b5fbef42c287a74bef4b3793cfa20a417e8f1d Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 28 Jan 2019 20:18:32 +0100 Subject: [PATCH 50/71] Remove obsolete Group tag References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag --- yp-tools.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/yp-tools.spec b/yp-tools.spec index 67ef4d6..cebab2d 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -3,7 +3,6 @@ Name: yp-tools Version: 4.2.3 Release: 3%{?dist} License: GPLv2 -Group: System Environment/Base Source: https://github.com/thkukuk/yp-tools/archive/v%{version}.tar.gz Patch1: yp-tools-2.12-hash.patch Patch2: yp-tools-2.12-crypt.patch @@ -38,7 +37,6 @@ you'll need to install the ypserv package on one machine on the network. %package devel Summary: NIS (or YP) client programs -Group: System Environment/Base Requires: yp-tools %description devel From 4f79a55d9d8931a0a4137e0c38f345e3c8fdf9bd Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 3 Feb 2019 13:00:41 +0000 Subject: [PATCH 51/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- yp-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index cebab2d..efef186 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 4.2.3 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 Source: https://github.com/thkukuk/yp-tools/archive/v%{version}.tar.gz Patch1: yp-tools-2.12-hash.patch @@ -77,6 +77,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Sun Feb 03 2019 Fedora Release Engineering - 4.2.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Mon Jan 14 2019 Björn Esser - 4.2.3-3 - Rebuilt for libcrypt.so.2 (#1666033) From 8cbc5e0761e8d7473e8a4b4ffbb26ca29365af0f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 27 Jul 2019 04:51:05 +0000 Subject: [PATCH 52/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- yp-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index efef186..8870661 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 4.2.3 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2 Source: https://github.com/thkukuk/yp-tools/archive/v%{version}.tar.gz Patch1: yp-tools-2.12-hash.patch @@ -77,6 +77,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Sat Jul 27 2019 Fedora Release Engineering - 4.2.3-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Sun Feb 03 2019 Fedora Release Engineering - 4.2.3-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 8c3df022862bde8c2cd519539cf132262a0dbc71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Janu=C5=A1?= Date: Tue, 29 Oct 2019 13:32:17 +0100 Subject: [PATCH 53/71] fix (#1671452), add patch --- yp-tools-4.2.3-yppasswd.patch | 19 +++++++++++++++++++ yp-tools.spec | 9 ++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 yp-tools-4.2.3-yppasswd.patch diff --git a/yp-tools-4.2.3-yppasswd.patch b/yp-tools-4.2.3-yppasswd.patch new file mode 100644 index 0000000..4c680e3 --- /dev/null +++ b/yp-tools-4.2.3-yppasswd.patch @@ -0,0 +1,19 @@ + author Filip Januš (fjanus@redhat.com) + date 29. 10. 2019 + + +diff -ur yp-tools-4.2.3/src/yppasswd.c yp-tools-master/src/yppasswd.c +--- yp-tools-4.2.3/src/yppasswd.c 2018-03-27 15:47:48.000000000 +0200 ++++ yp-tools-master/src/yppasswd.c 2019-10-29 12:00:29.000000000 +0100 +@@ -281,6 +281,11 @@ + CLIENT *clnt; + + clnt = clnt_create (master, YPPROG, YPVERS, "udp"); ++ ++ /* clnt_create can return NULL in some cases */ ++ if (clnt == NULL) ++ return NULL; ++ + clnt->cl_auth = authunix_create_default (); + + if (name == NULL) diff --git a/yp-tools.spec b/yp-tools.spec index 8870661..d8187f6 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,13 +1,14 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 4.2.3 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2 Source: https://github.com/thkukuk/yp-tools/archive/v%{version}.tar.gz 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.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 @@ -49,6 +50,7 @@ Install yp-tools-devel package for developing applications that use yp-tools %patch2 -p1 -b .crypt %patch3 -p1 -b .adjunct %patch4 -p1 -b .strict-prototypes +%patch5 -p1 autoreconf -i -f -v @@ -77,6 +79,11 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Tue Oct 29 2019 Filip Januš - 4.2.3-6 +- Add yppasswd patch +- Bug https://bugzilla.redhat.com/show_bug.cgi?id=1671452 +- Pull request https://github.com/thkukuk/yp-tools/pull/7 + * Sat Jul 27 2019 Fedora Release Engineering - 4.2.3-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From 027424d77bdb41b92351d42e662e6051f780cd92 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 31 Jan 2020 05:09:29 +0000 Subject: [PATCH 54/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- yp-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index d8187f6..7843412 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 4.2.3 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2 Source: https://github.com/thkukuk/yp-tools/archive/v%{version}.tar.gz Patch1: yp-tools-2.12-hash.patch @@ -79,6 +79,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Fri Jan 31 2020 Fedora Release Engineering - 4.2.3-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Tue Oct 29 2019 Filip Januš - 4.2.3-6 - Add yppasswd patch - Bug https://bugzilla.redhat.com/show_bug.cgi?id=1671452 From 9399460d6a0315560266c8786a927fe780741a07 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jul 2020 15:15:48 +0000 Subject: [PATCH 55/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- yp-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index 7843412..8ffb567 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 4.2.3 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2 Source: https://github.com/thkukuk/yp-tools/archive/v%{version}.tar.gz Patch1: yp-tools-2.12-hash.patch @@ -79,6 +79,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Wed Jul 29 2020 Fedora Release Engineering - 4.2.3-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Fri Jan 31 2020 Fedora Release Engineering - 4.2.3-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From 0e60ba4c4107ed044316687531f7408277f77365 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 9 Jan 2021 01:48:25 +0000 Subject: [PATCH 56/71] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- yp-tools.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/yp-tools.spec b/yp-tools.spec index 8ffb567..d558c02 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -10,6 +10,7 @@ Patch3: yp-tools-2.12-adjunct.patch Patch4: yp-tools-4.2.2-strict-prototypes.patch Patch5: yp-tools-4.2.3-yppasswd.patch Url: http://www.linux-nis.org/nis/yp-tools/index.html +BuildRequires: make BuildRequires: autoconf, automake, gettext-devel, libtool, libtirpc-devel, libnsl2-devel Requires: ypbind >= 3:2.4-2 Requires: glibc From e93c24ac81b7aa34994e9170b96531ef4edd1ae1 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 28 Jan 2021 00:34:38 +0000 Subject: [PATCH 57/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- yp-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index d558c02..786788b 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 4.2.3 -Release: 8%{?dist} +Release: 9%{?dist} License: GPLv2 Source: https://github.com/thkukuk/yp-tools/archive/v%{version}.tar.gz Patch1: yp-tools-2.12-hash.patch @@ -80,6 +80,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Thu Jan 28 2021 Fedora Release Engineering - 4.2.3-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Wed Jul 29 2020 Fedora Release Engineering - 4.2.3-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From d05a692008b7cdd7f2b038f0cce6ad51876adb55 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 22:09:58 +0000 Subject: [PATCH 58/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- yp-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index 786788b..b7917f8 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 4.2.3 -Release: 9%{?dist} +Release: 10%{?dist} License: GPLv2 Source: https://github.com/thkukuk/yp-tools/archive/v%{version}.tar.gz Patch1: yp-tools-2.12-hash.patch @@ -80,6 +80,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 4.2.3-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Thu Jan 28 2021 Fedora Release Engineering - 4.2.3-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 07357a4c993c3ec2abef3faf3aeb618ea4ee82c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Fri, 12 Nov 2021 22:26:59 +0100 Subject: [PATCH 59/71] Rebuild(libnsl2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Björn Esser --- yp-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index b7917f8..186f7d1 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 4.2.3 -Release: 10%{?dist} +Release: 11%{?dist} License: GPLv2 Source: https://github.com/thkukuk/yp-tools/archive/v%{version}.tar.gz Patch1: yp-tools-2.12-hash.patch @@ -80,6 +80,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Fri Nov 12 2021 Björn Esser - 4.2.3-11 +- Rebuild(libnsl2) + * Fri Jul 23 2021 Fedora Release Engineering - 4.2.3-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From ca8a641b1adc569a74be3cbd406c58eb99960346 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jan 2022 05:43:30 +0000 Subject: [PATCH 60/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- yp-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index 186f7d1..f2cd151 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 4.2.3 -Release: 11%{?dist} +Release: 12%{?dist} License: GPLv2 Source: https://github.com/thkukuk/yp-tools/archive/v%{version}.tar.gz Patch1: yp-tools-2.12-hash.patch @@ -80,6 +80,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Sat Jan 22 2022 Fedora Release Engineering - 4.2.3-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Fri Nov 12 2021 Björn Esser - 4.2.3-11 - Rebuild(libnsl2) From 96414c8d511610309d059f492a2adeba14d779c7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 23 Jul 2022 13:46:34 +0000 Subject: [PATCH 61/71] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- yp-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index f2cd151..1d899b4 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 4.2.3 -Release: 12%{?dist} +Release: 13%{?dist} License: GPLv2 Source: https://github.com/thkukuk/yp-tools/archive/v%{version}.tar.gz Patch1: yp-tools-2.12-hash.patch @@ -80,6 +80,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Sat Jul 23 2022 Fedora Release Engineering - 4.2.3-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Sat Jan 22 2022 Fedora Release Engineering - 4.2.3-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From a3389b2b8d8a80a078ddf62e79ed7eafd2cc76b8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 21 Jan 2023 08:07:15 +0000 Subject: [PATCH 62/71] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- yp-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index 1d899b4..f463616 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 4.2.3 -Release: 13%{?dist} +Release: 14%{?dist} License: GPLv2 Source: https://github.com/thkukuk/yp-tools/archive/v%{version}.tar.gz Patch1: yp-tools-2.12-hash.patch @@ -80,6 +80,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Sat Jan 21 2023 Fedora Release Engineering - 4.2.3-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Sat Jul 23 2022 Fedora Release Engineering - 4.2.3-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 17e3997a83f366e67b378cfb1bb2a82c36fae9cf Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jul 2023 19:32:31 +0000 Subject: [PATCH 63/71] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- yp-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index f463616..0962bef 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 4.2.3 -Release: 14%{?dist} +Release: 15%{?dist} License: GPLv2 Source: https://github.com/thkukuk/yp-tools/archive/v%{version}.tar.gz Patch1: yp-tools-2.12-hash.patch @@ -80,6 +80,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Sat Jul 22 2023 Fedora Release Engineering - 4.2.3-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Sat Jan 21 2023 Fedora Release Engineering - 4.2.3-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From b46e2bc563f62e65dfccc0dbd9f9261db6b9ee7f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 27 Jan 2024 10:50:13 +0000 Subject: [PATCH 64/71] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- yp-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index 0962bef..a95a8f7 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 4.2.3 -Release: 15%{?dist} +Release: 16%{?dist} License: GPLv2 Source: https://github.com/thkukuk/yp-tools/archive/v%{version}.tar.gz Patch1: yp-tools-2.12-hash.patch @@ -80,6 +80,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Sat Jan 27 2024 Fedora Release Engineering - 4.2.3-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sat Jul 22 2023 Fedora Release Engineering - 4.2.3-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 2305a85795931c4df3247663af9ea86427073fd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sloup?= Date: Tue, 30 Jan 2024 19:49:18 +0100 Subject: [PATCH 65/71] Fix /etc/passwd flags for locked and deactivated account (rhbz#2093381), Update license tag to the SPDX format (GPL-2.0-only) Minor spec adjustements + autosetup --- ...ools-4.2.3-yppasswd-exclamation_mark.patch | 15 ++++++++++++ yp-tools.spec | 23 +++++++++++-------- 2 files changed, 28 insertions(+), 10 deletions(-) create mode 100644 yp-tools-4.2.3-yppasswd-exclamation_mark.patch diff --git a/yp-tools-4.2.3-yppasswd-exclamation_mark.patch b/yp-tools-4.2.3-yppasswd-exclamation_mark.patch new file mode 100644 index 0000000..c85be96 --- /dev/null +++ b/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\n", progname); ++ return 1; ++ } ++ + /* Initialize password information */ + memset (&yppwd, '\0', sizeof (yppwd)); + yppwd.newpw.pw_passwd = pwd->pw_passwd; diff --git a/yp-tools.spec b/yp-tools.spec index a95a8f7..7662f03 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,15 +1,19 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 4.2.3 -Release: 16%{?dist} -License: GPLv2 +Release: 17%{?dist} +License: GPL-2.0-only + +URL: https://www.thkukuk.de/nis/nis/yp-tools/ Source: https://github.com/thkukuk/yp-tools/archive/v%{version}.tar.gz + 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.patch -Url: http://www.linux-nis.org/nis/yp-tools/index.html +Patch6: yp-tools-4.2.3-yppasswd-exclamation_mark.patch + BuildRequires: make BuildRequires: autoconf, automake, gettext-devel, libtool, libtirpc-devel, libnsl2-devel Requires: ypbind >= 3:2.4-2 @@ -46,13 +50,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 -%patch5 -p1 - +%autosetup -n %{name}-%{version} -p1 autoreconf -i -f -v @@ -60,6 +58,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 @@ -80,6 +79,10 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Tue Jan 30 2024 Ondrej Sloup - 4.2.3-17 +- Update license tag to the SPDX format (GPL-2.0-only) +- Fix /etc/passwd flags for locked and deactivated account (rhbz#2093381) + * Sat Jan 27 2024 Fedora Release Engineering - 4.2.3-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 8d79e7ead19682e1b34f98ef4498b247d3577253 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jul 2024 10:43:38 +0000 Subject: [PATCH 66/71] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- yp-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index 7662f03..e4e7a58 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 4.2.3 -Release: 17%{?dist} +Release: 18%{?dist} License: GPL-2.0-only URL: https://www.thkukuk.de/nis/nis/yp-tools/ @@ -79,6 +79,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Sat Jul 20 2024 Fedora Release Engineering - 4.2.3-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Tue Jan 30 2024 Ondrej Sloup - 4.2.3-17 - Update license tag to the SPDX format (GPL-2.0-only) - Fix /etc/passwd flags for locked and deactivated account (rhbz#2093381) From d9e307ecca57a6d9601a1eb941b7d217522c9808 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 19 Jan 2025 16:36:06 +0000 Subject: [PATCH 67/71] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- yp-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index e4e7a58..d5e8158 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 4.2.3 -Release: 18%{?dist} +Release: 19%{?dist} License: GPL-2.0-only URL: https://www.thkukuk.de/nis/nis/yp-tools/ @@ -79,6 +79,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Sun Jan 19 2025 Fedora Release Engineering - 4.2.3-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Sat Jul 20 2024 Fedora Release Engineering - 4.2.3-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From a818b9fb6fc4969d6b885972fb3c5b73f790a6ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Sat, 1 Feb 2025 19:58:28 +0100 Subject: [PATCH 68/71] Add explicit BR: libxcrypt-devel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Björn Esser --- yp-tools.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index d5e8158..c90b094 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 4.2.3 -Release: 19%{?dist} +Release: 20%{?dist} License: GPL-2.0-only URL: https://www.thkukuk.de/nis/nis/yp-tools/ @@ -15,6 +15,7 @@ Patch5: yp-tools-4.2.3-yppasswd.patch Patch6: yp-tools-4.2.3-yppasswd-exclamation_mark.patch BuildRequires: make +BuildRequires: libxcrypt-devel BuildRequires: autoconf, automake, gettext-devel, libtool, libtirpc-devel, libnsl2-devel Requires: ypbind >= 3:2.4-2 Requires: glibc @@ -79,6 +80,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Sat Feb 01 2025 Björn Esser - 4.2.3-20 +- Add explicit BR: libxcrypt-devel + * Sun Jan 19 2025 Fedora Release Engineering - 4.2.3-19 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From de942a148b0ef7391ec94c55e2f69d3d976e6cf1 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 21:13:21 +0000 Subject: [PATCH 69/71] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- yp-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index c90b094..cce17c5 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 4.2.3 -Release: 20%{?dist} +Release: 21%{?dist} License: GPL-2.0-only URL: https://www.thkukuk.de/nis/nis/yp-tools/ @@ -80,6 +80,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 4.2.3-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Sat Feb 01 2025 Björn Esser - 4.2.3-20 - Add explicit BR: libxcrypt-devel From 9e6d17ad9870a1c183e0a6602ebc8ce8eb85de4a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 17 Jan 2026 21:03:01 +0000 Subject: [PATCH 70/71] Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild --- yp-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index cce17c5..09a8e17 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 4.2.3 -Release: 21%{?dist} +Release: 22%{?dist} License: GPL-2.0-only URL: https://www.thkukuk.de/nis/nis/yp-tools/ @@ -80,6 +80,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Sat Jan 17 2026 Fedora Release Engineering - 4.2.3-22 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild + * Fri Jul 25 2025 Fedora Release Engineering - 4.2.3-21 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 612f54c61c11b35f06361e5debaabf7c4362885f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jul 2026 09:35:39 +0000 Subject: [PATCH 71/71] Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild --- yp-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yp-tools.spec b/yp-tools.spec index 09a8e17..9e04312 100644 --- a/yp-tools.spec +++ b/yp-tools.spec @@ -1,7 +1,7 @@ Summary: NIS (or YP) client programs Name: yp-tools Version: 4.2.3 -Release: 22%{?dist} +Release: 23%{?dist} License: GPL-2.0-only URL: https://www.thkukuk.de/nis/nis/yp-tools/ @@ -80,6 +80,9 @@ make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install install /var/yp/nicknames %changelog +* Fri Jul 17 2026 Fedora Release Engineering - 4.2.3-23 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild + * Sat Jan 17 2026 Fedora Release Engineering - 4.2.3-22 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild