From 6dcd014f46c3d0a6bdb1de365aa6909170777a16 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jan 17 2017 15:26:25 +0000 Subject: import ypserv-2.31-9.el7_3 --- diff --git a/SOURCES/ypserv-2.31-map-update.patch b/SOURCES/ypserv-2.31-map-update.patch new file mode 100644 index 0000000..f7a235d --- /dev/null +++ b/SOURCES/ypserv-2.31-map-update.patch @@ -0,0 +1,16 @@ +https://github.com/thkukuk/ypserv/pull/2 +diff --git a/ypxfr/ypxfr.c b/ypxfr/ypxfr.c +index 358ac8d..d44773b 100644 +--- a/ypxfr/ypxfr.c ++++ b/ypxfr/ypxfr.c +@@ -517,8 +517,8 @@ ypxfr (char *map, char *source_host, char *source_domain, char *target_domain, + if (ypproc_order_2 (&req_nokey, &resp_order, clnt_udp) != RPC_SUCCESS) + { + log_msg (clnt_sperror (clnt_udp, "ypproc_order_2")); +- masterOrderNum = time (NULL); /* We set it to the current time. +- So a new map will be always newer. */ ++ clnt_destroy (clnt_udp); ++ return YPXFR_YPERR; + } + else if (resp_order.stat != YP_TRUE) + { diff --git a/SOURCES/ypserv-2.31-open-correct-db.patch b/SOURCES/ypserv-2.31-open-correct-db.patch new file mode 100644 index 0000000..f1d2262 --- /dev/null +++ b/SOURCES/ypserv-2.31-open-correct-db.patch @@ -0,0 +1,14 @@ +https://github.com/thkukuk/ypserv/pull/3 +diff --git a/ypxfr/ypxfr.c b/ypxfr/ypxfr.c +index d44773b..b2ad875 100644 +--- a/ypxfr/ypxfr.c ++++ b/ypxfr/ypxfr.c +@@ -627,7 +627,7 @@ ypxfr (char *map, char *source_host, char *source_domain, char *target_domain, + dbm = dbm_open (dbName_temp, O_CREAT|O_RDWR, 0600); + #elif defined(HAVE_LIBTC) + dbm = tcbdbnew (); +- if (!tcbdbopen (dbm, dbName_orig, BDBOWRITER | BDBOCREAT | BDBOTRUNC)) ++ if (!tcbdbopen (dbm, dbName_temp, BDBOWRITER | BDBOCREAT | BDBOTRUNC)) + { + tcbdbdel (dbm); + dbm = NULL; diff --git a/SPECS/ypserv.spec b/SPECS/ypserv.spec index ffe4884..b97e6e2 100644 --- a/SPECS/ypserv.spec +++ b/SPECS/ypserv.spec @@ -2,7 +2,7 @@ Summary: The NIS (Network Information Service) server Url: http://www.linux-nis.org/nis/ypserv/index.html Name: ypserv Version: 2.31 -Release: 8%{?dist} +Release: 9%{?dist} License: GPLv2 Group: System Environment/Daemons Source0: http://www.linux-nis.org/download/ypserv/ypserv-%{version}.tar.bz2 @@ -31,6 +31,8 @@ Patch9: ypserv-2.29-relro.patch Patch10: ypserv-2.31-netgrprecur.patch Patch11: ypserv-tcopenfail.patch Patch12: ypserv-minuid.patch +Patch13: ypserv-2.31-map-update.patch +Patch14: ypserv-2.31-open-correct-db.patch BuildRequires: tokyocabinet-devel BuildRequires: systemd @@ -68,6 +70,8 @@ machines. %patch10 -p1 -b .netgrprecur %patch11 -p1 -b .tcopenfail %patch12 -p1 -b .minuid +%patch13 -p1 -b .map-update +%patch14 -p1 -b .open-correct-db autoreconf @@ -157,6 +161,11 @@ install -m 755 %{SOURCE4} $RPM_BUILD_ROOT%{_libexecdir}/rpc.yppasswdd.env %{_includedir}/*/* %changelog +* Wed Nov 30 2016 Matej Mužila - 2.31-9 +- Do not update NIS map when master's version is older +- Open correct _temporary_ db with tokyocabinet +- Resolves #1305137, #1331882 + * Fri Jan 24 2014 Daniel Mach - 2.31-8 - Mass rebuild 2014-01-24