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] 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