From e46dcf5e12eb492e6b06d294b70fce208cced79e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Fri, 21 Oct 2011 12:13:08 +0000 Subject: [PATCH] - fix completely broken logic in get_fqhostname Changed files: cyrus-sasl-get_fqhostname.patch -> 1.1 cyrus-sasl.spec -> 1.214 --- cyrus-sasl-get_fqhostname.patch | 59 +++++++++++++++++++++++++++++++++ cyrus-sasl.spec | 4 ++- 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 cyrus-sasl-get_fqhostname.patch diff --git a/cyrus-sasl-get_fqhostname.patch b/cyrus-sasl-get_fqhostname.patch new file mode 100644 index 0000000..b3dc444 --- /dev/null +++ b/cyrus-sasl-get_fqhostname.patch @@ -0,0 +1,59 @@ +--- cyrus-sasl-2.1.25/lib/saslutil.c.orig 2011-10-21 13:59:59.354462366 +0200 ++++ cyrus-sasl-2.1.25/lib/saslutil.c 2011-10-21 14:10:55.849675881 +0200 +@@ -555,32 +555,44 @@ + NULL, /* don't care abour service/port */ + &hints, + &result) != 0) { +- /* errno on Unix, WSASetLastError on Windows are already done by the function */ +- return (-1); ++ if (abort_if_no_fqdn) { ++ /* errno on Unix, WSASetLastError on Windows are already done by the function */ ++ return (-1); ++ } else { ++ goto LOWERCASE; ++ } + } + +- if (abort_if_no_fqdn && (result == NULL || result->ai_canonname == NULL)) { ++ if (result == NULL || result->ai_canonname == NULL) { + freeaddrinfo (result); ++ if (abort_if_no_fqdn) { + #ifdef WIN32 +- WSASetLastError (WSANO_DATA); ++ WSASetLastError (WSANO_DATA); + #elif defined(ENODATA) +- errno = ENODATA; ++ errno = ENODATA; + #elif defined(EADDRNOTAVAIL) +- errno = EADDRNOTAVAIL; ++ errno = EADDRNOTAVAIL; + #endif +- return (-1); ++ return (-1); ++ } else { ++ goto LOWERCASE; ++ } + } + +- if (abort_if_no_fqdn && strchr (result->ai_canonname, '.') == NULL) { ++ if (strchr (result->ai_canonname, '.') == NULL) { + freeaddrinfo (result); ++ if (abort_if_no_fqdn) { + #ifdef WIN32 +- WSASetLastError (WSANO_DATA); ++ WSASetLastError (WSANO_DATA); + #elif defined(ENODATA) +- errno = ENODATA; ++ errno = ENODATA; + #elif defined(EADDRNOTAVAIL) +- errno = EADDRNOTAVAIL; ++ errno = EADDRNOTAVAIL; + #endif +- return (-1); ++ return (-1); ++ } else { ++ goto LOWERCASE; ++ } + } + + diff --git a/cyrus-sasl.spec b/cyrus-sasl.spec index 5379f9e..dce68b2 100644 --- a/cyrus-sasl.spec +++ b/cyrus-sasl.spec @@ -25,7 +25,7 @@ Summary(ru.UTF-8): Библиотека Cyrus SASL Summary(uk.UTF-8): Бібліотека Cyrus SASL Name: cyrus-sasl Version: 2.1.25 -Release: 4.5 +Release: 4.9 License: distributable Group: Libraries Source0: ftp://ftp.cyrusimap.org/cyrus-sasl/%{name}-%{version}.tar.gz @@ -56,6 +56,7 @@ Patch17: 0032-revert_1.103_revision_to_unbreak_GSSAPI.patch Patch18: 0033-fix_segfault_in_GSSAPI.patch Patch19: 0034-fix_dovecot_authentication.patch Patch20: %{name}-auxprop.patch +Patch21: %{name}-get_fqhostname.patch URL: http://asg.web.cmu.edu/sasl/ BuildRequires: autoconf >= 2.54 BuildRequires: automake >= 1:1.7 @@ -490,6 +491,7 @@ Wtyczka Nagiosa do sprawdzania działania saslauthd. %patch18 -p1 %patch19 -p1 %patch20 -p1 +%patch21 -p1 cd doc echo "cyrus-sasl complies with the following RFCs:" > rfc-compliance -- 2.43.0