- Include fix for Cyrus SASL Bug#3589: When abort_if_no_fqdn is 0,
a getaddrinfo failure should be ignored, as long as gethostname() succeeded. (bnc#771983) OBS-URL: https://build.opensuse.org/package/show/network/cyrus-sasl?expand=0&rev=32
This commit is contained in:
parent
5e1a38d881
commit
dde830d9d1
74
Fix-abort_if_no_fqdn-behavior.patch
Normal file
74
Fix-abort_if_no_fqdn-behavior.patch
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
commit 8fc14fd702897e652a38384af2f55e51752e8c15
|
||||||
|
Author: Alexey Melnikov <alexey.melnikov@isode.com>
|
||||||
|
Date: Tue May 29 16:00:47 2012 +0100
|
||||||
|
|
||||||
|
get_fqhostname() function has broken logic when abort_if_no_fqdn is 0
|
||||||
|
|
||||||
|
When abort_if_no_fqdn is 0, a getaddrinfo failure should be ignored,
|
||||||
|
as long as gethostname() succeeded.
|
||||||
|
|
||||||
|
Cyrus SASL Bug # 3589
|
||||||
|
|
||||||
|
Patch by baggins@pld-linux.org
|
||||||
|
|
||||||
|
diff --git a/lib/saslutil.c b/lib/saslutil.c
|
||||||
|
index fc5b774..6174124 100644
|
||||||
|
--- a/lib/saslutil.c
|
||||||
|
+++ b/lib/saslutil.c
|
||||||
|
@@ -557,32 +557,44 @@ int get_fqhostname(
|
||||||
|
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;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Aug 13 07:55:11 UTC 2012 - rhafer@suse.de
|
||||||
|
|
||||||
|
- Include fix for Cyrus SASL Bug#3589: When abort_if_no_fqdn is 0,
|
||||||
|
a getaddrinfo failure should be ignored, as long as gethostname()
|
||||||
|
succeeded. (bnc#771983)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed May 9 21:47:48 UTC 2012 - crrodriguez@opensuse.org
|
Wed May 9 21:47:48 UTC 2012 - crrodriguez@opensuse.org
|
||||||
|
|
||||||
|
@ -42,6 +42,7 @@ Patch3: cyrus-sasl-gs2-not-overwrite-minor-error-code.dif
|
|||||||
Patch4: gssapi-null-deref.dif
|
Patch4: gssapi-null-deref.dif
|
||||||
Patch5: cyrus-sasl-no_rpath.patch
|
Patch5: cyrus-sasl-no_rpath.patch
|
||||||
Patch6: cyrus-sasl-lfs.patch
|
Patch6: cyrus-sasl-lfs.patch
|
||||||
|
Patch7: Fix-abort_if_no_fqdn-behavior.patch
|
||||||
PreReq: %insserv_prereq %fillup_prereq
|
PreReq: %insserv_prereq %fillup_prereq
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
@ -75,6 +76,7 @@ The SQL auxprop plugin supports PostgreSQL and MySQL
|
|||||||
%patch4 -p1
|
%patch4 -p1
|
||||||
%patch5 -p1
|
%patch5 -p1
|
||||||
%patch6
|
%patch6
|
||||||
|
%patch7 -p1
|
||||||
%build
|
%build
|
||||||
find . -name \*.cvsignore -print0 | xargs -0 rm -vf
|
find . -name \*.cvsignore -print0 | xargs -0 rm -vf
|
||||||
autoreconf -f -i
|
autoreconf -f -i
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Aug 13 07:55:11 UTC 2012 - rhafer@suse.de
|
||||||
|
|
||||||
|
- Include fix for Cyrus SASL Bug#3589: When abort_if_no_fqdn is 0,
|
||||||
|
a getaddrinfo failure should be ignored, as long as gethostname()
|
||||||
|
succeeded. (bnc#771983)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed May 9 21:47:48 UTC 2012 - crrodriguez@opensuse.org
|
Wed May 9 21:47:48 UTC 2012 - crrodriguez@opensuse.org
|
||||||
|
|
||||||
|
@ -45,6 +45,7 @@ Patch3: cyrus-sasl-gs2-not-overwrite-minor-error-code.dif
|
|||||||
Patch4: gssapi-null-deref.dif
|
Patch4: gssapi-null-deref.dif
|
||||||
Patch5: cyrus-sasl-no_rpath.patch
|
Patch5: cyrus-sasl-no_rpath.patch
|
||||||
Patch6: cyrus-sasl-lfs.patch
|
Patch6: cyrus-sasl-lfs.patch
|
||||||
|
Patch7: Fix-abort_if_no_fqdn-behavior.patch
|
||||||
PreReq: %insserv_prereq %fillup_prereq
|
PreReq: %insserv_prereq %fillup_prereq
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
@ -160,6 +161,7 @@ fi
|
|||||||
%patch4 -p1
|
%patch4 -p1
|
||||||
%patch5 -p1
|
%patch5 -p1
|
||||||
%patch6
|
%patch6
|
||||||
|
%patch7 -p1
|
||||||
%build
|
%build
|
||||||
find . -name \*.cvsignore -print0 | xargs -0 rm -fv
|
find . -name \*.cvsignore -print0 | xargs -0 rm -fv
|
||||||
autoreconf -f -i
|
autoreconf -f -i
|
||||||
|
Loading…
x
Reference in New Issue
Block a user