Update to version 4.2.2 supporting IPv6
This commit is contained in:
parent
9110c6134e
commit
996e4bef29
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,3 +1,6 @@
|
|||||||
yp-tools-2.11.tar.bz2
|
yp-tools-2.11.tar.bz2
|
||||||
/yp-tools-2.12.tar.bz2
|
/yp-tools-2.12.tar.bz2
|
||||||
/yp-tools-2.14.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
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
ba1f121c17e3ad65368be173b977cd13 yp-tools-2.14.tar.bz2
|
SHA512 (yp-tools-yp-tools-4.2.2.tar.gz) = da60b1be08432f61789cbd62a491996f47bfcbe296723d1984b4d0d2e755022e40e682cfd779597008c823e7fca2f115d85d446893f2b8ce001aba5744c2cfce
|
||||||
|
@ -1,30 +1,6 @@
|
|||||||
diff -up yp-tools-2.12/src/yppasswd.c.crypt yp-tools-2.12/src/yppasswd.c
|
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.crypt 2012-04-23 13:01:35.599721168 +0200
|
||||||
+++ yp-tools-2.12/src/yppasswd.c 2012-04-23 13:16:18.251261293 +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)
|
@@ -772,9 +778,16 @@ main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
int passwdlen = get_passwd_len (pwd->pw_passwd);
|
int passwdlen = get_passwd_len (pwd->pw_passwd);
|
||||||
|
85
yp-tools-3.3-add_mapv4v6addr.h.patch
Normal file
85
yp-tools-3.3-add_mapv4v6addr.h.patch
Normal file
@ -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 <string.h>
|
||||||
|
+#include <arpa/nameser.h>
|
||||||
|
+
|
||||||
|
+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 <resolv/mapv4v6addr.h>
|
||||||
|
+#include <mapv4v6addr.h>
|
||||||
|
|
||||||
|
#define ENTNAME hostent
|
||||||
|
#define DATABASE "hosts"
|
16
yp-tools-3.3-headers.patch
Normal file
16
yp-tools-3.3-headers.patch
Normal file
@ -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
|
24
yp-tools-3.3-no-nss-nis6.patch
Normal file
24
yp-tools-3.3-no-nss-nis6.patch
Normal file
@ -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
|
11
yp-tools-4.2.2-strict-prototypes.patch
Normal file
11
yp-tools-4.2.2-strict-prototypes.patch
Normal file
@ -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)
|
@ -1,22 +1,28 @@
|
|||||||
Summary: NIS (or YP) client programs
|
Summary: NIS (or YP) client programs
|
||||||
Name: yp-tools
|
Name: yp-tools
|
||||||
Version: 2.14
|
Version: 4.2.2
|
||||||
Release: 4%{?dist}
|
Release: 1%{?dist}
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
Group: System Environment/Base
|
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
|
# Not sent to upstream
|
||||||
Patch0: yp-tools-2.11-shadow.patch
|
Patch0: yp-tools-2.11-shadow.patch
|
||||||
Patch3: yp-tools-2.12-hash.patch
|
Patch3: yp-tools-2.12-hash.patch
|
||||||
Patch4: yp-tools-2.12-crypt.patch
|
Patch4: yp-tools-2.12-crypt.patch
|
||||||
Patch5: yp-tools-2.12-adjunct.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
|
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: ypbind
|
||||||
|
Requires: glibc
|
||||||
|
|
||||||
|
%global __filter_GLIBC_PRIVATE 1
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The Network Information Service (NIS) is a system which provides
|
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
|
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
|
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
|
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,
|
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.
|
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
|
%prep
|
||||||
%setup -q
|
%setup -q -n %{name}-%{name}-%{version}
|
||||||
%patch0 -p1 -b .shadow
|
#%patch0 -p1 -b .shadow
|
||||||
%patch3 -p1 -b .hash
|
%patch3 -p1 -b .hash
|
||||||
%patch4 -p1 -b .crypt
|
%patch4 -p1 -b .crypt
|
||||||
%patch5 -p1 -b .adjunct
|
#%patch5 -p1 -b .adjunct
|
||||||
autoreconf -i -f
|
%patch8 -p1 -b .strict-prototypes
|
||||||
|
|
||||||
|
|
||||||
|
autoreconf -i -f -v
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
|
export CFLAGS="$CFLAGS %{optflags}"
|
||||||
|
|
||||||
%configure --disable-domainname
|
%configure --disable-domainname
|
||||||
make
|
|
||||||
|
%make_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make DESTDIR="$RPM_BUILD_ROOT" INSTALL_PROGRAM=install 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
|
%files -f %{name}.lang
|
||||||
%doc AUTHORS COPYING README ChangeLog NEWS etc/nsswitch.conf
|
%doc AUTHORS COPYING README ChangeLog NEWS etc/nsswitch.conf
|
||||||
%doc THANKS TODO
|
%doc THANKS
|
||||||
%{_bindir}/*
|
%{_bindir}/*
|
||||||
|
|
||||||
|
|
||||||
%{_mandir}/*/*
|
%{_mandir}/*/*
|
||||||
%{_sbindir}/*
|
%{_sbindir}/*
|
||||||
/var/yp/nicknames
|
/var/yp/nicknames
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri May 19 2017 Matej Mužila <mmuzila@redhat.com> - 4.2.2-1
|
||||||
|
- Update to version 4.2.2 supporting IPv6
|
||||||
|
|
||||||
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.14-4
|
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.14-4
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user