- Use a clearer error message if the service name is unknown in "accept"

Resolves: #450344
This commit is contained in:
Miloslav Trmac 2008-06-08 05:01:32 +00:00
parent 941e460ee1
commit c1b6056575
2 changed files with 24 additions and 1 deletions

View File

@ -0,0 +1,17 @@
diff -up stunnel-4.25/src/resolver.c~ stunnel-4.25/src/resolver.c
--- stunnel-4.25/src/resolver.c~ 2008-03-26 20:09:48.000000000 +0100
+++ stunnel-4.25/src/resolver.c 2008-06-08 06:43:43.000000000 +0200
@@ -124,8 +124,11 @@ int hostport2addrlist(SOCKADDR_LIST *add
err=getaddrinfo(hostname, portname, &hints, &res);
if(err) {
- s_log(LOG_ERR, "Error resolving '%s': %s",
- hostname, s_gai_strerror(err));
+ if(err == EAI_SERVICE)
+ s_log(LOG_ERR, "Unknown TCP service '%s'", portname);
+ else
+ s_log(LOG_ERR, "Error resolving '%s': %s",
+ hostname, s_gai_strerror(err));
if(res)
freeaddrinfo(res);
return 0; /* Error */

View File

@ -1,7 +1,7 @@
Summary: An SSL-encrypting socket wrapper
Name: stunnel
Version: 4.25
Release: 1
Release: 2
License: GPLv2
Group: Applications/Internet
URL: http://stunnel.mirt.net/
@ -14,6 +14,7 @@ Source5: pop3-redirect.xinetd
Source6: stunnel-pop3s-client.conf
Patch0: stunnel-4.08-authpriv.patch
Patch1: stunnel-4.18-sample.patch
Patch2: stunnel-4.25-EAI_SERVICE.patch
Buildroot: %{_tmppath}/stunnel-root
# util-linux is needed for rename
BuildRequires: openssl-devel, pkgconfig, tcp_wrappers-devel, util-linux
@ -27,6 +28,7 @@ in conjunction with imapd to create an SSL secure IMAP server.
%setup -q
%patch0 -p1 -b .authpriv
%patch1 -p1 -b .sample
%patch2 -p1 -b .EAI_SERVICE
iconv -f iso-8859-1 -t utf-8 < doc/stunnel.fr.8 > doc/stunnel.fr.8_
mv doc/stunnel.fr.8_ doc/stunnel.fr.8
@ -81,6 +83,10 @@ rm -rf $RPM_BUILD_ROOT
%exclude %{_sysconfdir}/stunnel/*
%changelog
* Sun Jun 8 2008 Miloslav Trmač <mitr@redhat.com> - 4.25-2
- Use a clearer error message if the service name is unknown in "accept"
Resolves: #450344
* Mon Jun 2 2008 Miloslav Trmač <mitr@redhat.com> - 4.25-1
- Update to stunnel-4.25