From dc565f4e83076ee38dd0893fa304a3384bf8fa49 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Thu, 12 Apr 2018 16:37:32 +0200 Subject: [PATCH] Update to 0.11.11-2 - Update to upstream 0.11.11 release - include crypt.h to use crypt() --- .gitignore | 11 +++++++ ocserv-0.11.11-crypt.patch | 65 ++++++++++++++++++++++++++++++++++++++ ocserv.spec | 7 +++- 3 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 ocserv-0.11.11-crypt.patch diff --git a/.gitignore b/.gitignore index 325d272..3553425 100644 --- a/.gitignore +++ b/.gitignore @@ -115,3 +115,14 @@ /gpgkey-1F42418905D8206AA754CCDC29EE58B996865171.gpg /ocserv-0.11.11.tar.xz.sig /ocserv-0.11.11.tar.xz +/ocserv.init +/gpgkey-56EE7FA9E8173B19FE86268D763712747F343FA7.gpg +/ocserv-script +/ocserv-genkey +/PACKAGE-LICENSING +/ocserv-pamd.conf +/ocserv.service +/ocserv.conf +/gpgkey-1F42418905D8206AA754CCDC29EE58B996865171.gpg +/ocserv-0.11.11.tar.xz.sig +/ocserv-0.11.11.tar.xz diff --git a/ocserv-0.11.11-crypt.patch b/ocserv-0.11.11-crypt.patch new file mode 100644 index 0000000..cec65e6 --- /dev/null +++ b/ocserv-0.11.11-crypt.patch @@ -0,0 +1,65 @@ +From cf9cda99a5caf8fabd547f25a962b96a46e13957 Mon Sep 17 00:00:00 2001 +From: Nikos Mavrogiannopoulos +Date: Thu, 12 Apr 2018 14:58:59 +0200 +Subject: [PATCH] include crypt.h to use crypt() + +This is necessary in Fedora28 as it doesn't provide +crypt() prototype in unistd.h + +https://bugzilla.redhat.com/show_bug.cgi?id=1566464 + +Signed-off-by: Nikos Mavrogiannopoulos +--- + configure.ac | 2 +- + src/auth/plain.c | 5 +++++ + src/ocpasswd/ocpasswd.c | 5 +++++ + 3 files changed, 11 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 71c27564..c03d8e7b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -319,7 +319,7 @@ AC_CHECK_MEMBER([struct sockaddr.sa_len], + #include + ]) + +-AC_CHECK_HEADERS([net/if_tun.h linux/if_tun.h netinet/in_systm.h], [], [], []) ++AC_CHECK_HEADERS([net/if_tun.h linux/if_tun.h netinet/in_systm.h crypt.h], [], [], []) + + AC_CHECK_FUNCS([setproctitle vasprintf clock_gettime isatty pselect ppoll getpeereid sigaltstack]) + AC_CHECK_FUNCS([strlcpy posix_memalign malloc_trim strsep]) +diff --git a/src/auth/plain.c b/src/auth/plain.c +index 2052e07d..f9c7b1b1 100644 +--- a/src/auth/plain.c ++++ b/src/auth/plain.c +@@ -37,6 +37,11 @@ + #ifdef HAVE_LIBOATH + # include + #endif ++#ifdef HAVE_CRYPT_H ++ /* libcrypt in Fedora28 does not provide prototype ++ * in unistd.h */ ++# include ++#endif + + #define MAX_CPASS_SIZE 128 + #define HOTP_WINDOW 20 +diff --git a/src/ocpasswd/ocpasswd.c b/src/ocpasswd/ocpasswd.c +index de3b8396..abb66744 100644 +--- a/src/ocpasswd/ocpasswd.c ++++ b/src/ocpasswd/ocpasswd.c +@@ -32,6 +32,11 @@ + #include + #include + #include "ocpasswd-args.h" ++#ifdef HAVE_CRYPT_H ++ /* libcrypt in Fedora28 does not provide prototype ++ * in unistd.h */ ++# include ++#endif + + /* Gnulib portability files. */ + #include +-- +2.14.3 + diff --git a/ocserv.spec b/ocserv.spec index eac0ae1..53982f9 100644 --- a/ocserv.spec +++ b/ocserv.spec @@ -1,6 +1,7 @@ # This spec file has been automatically updated Version: 0.11.11 -Release: 1%{?dist} +Release: 2%{?dist} +Patch1: ocserv-0.11.11-crypt.patch %global _hardened_build 1 %if 0%{?fedora} || 0%{?rhel} >= 7 @@ -262,6 +263,10 @@ install -D -m 0755 %{SOURCE11} %{buildroot}/%{_initrddir}/%{name} %endif %changelog +* Thu Apr 12 2018 Nikos Mavrogiannopoulos - 0.11.11-2 +- Update to upstream 0.11.11 release +- include crypt.h to use crypt() + * Mon Mar 05 2018 Nikos Mavrogiannopoulos - 0.11.11-1 - Update to upstream 0.11.11 release