[stunnel-users] stunnel libwrap/tcpwrapper bug (patch included)

Stefan Behte s.behte at babiel.com
Mon Feb 7 17:16:38 CET 2011


Hi,

I stumbled upon a really old bug in stunnel:

./configure --enable-libwrap && make

[...]

mv -f .deps/pty.Tpo .deps/pty.Po
gcc -DPACKAGE_NAME=\"stunnel\" -DPACKAGE_TARNAME=\"stunnel\" -DPACKAGE_VERSION=\"4.35\" -DPACKAGE_STRING=\"stunnel\ 4.35\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"stunnel\" -DVERSION=\"4.35\" -D_GNU_SOURCE=1 -DHOST=\"i686-pc-linux-gnu\" -DCPU_I686=1 -DVENDOR_PC=1 -DOS_LINUX_GNU=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSIZEOF_UNSIGNED_CHAR=1 -DSIZEOF_UNSIGNED_SHORT=2 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_UNSIGNED_LONG=4 -DHAVE_DEV_PTMX=1 -DRANDOM_FILE=\"/dev/urandom\" -DHAVE_UCONTEXT_H=1 -DHAVE_PTHREAD_H=1 -DHAVE_SYS_SELECT_H=1 -DHAVE_POLL_H=1 -DHAVE_SYS_POLL_H=1 -DHAVE_TCPD_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_STROPTS_H=1 -DHAVE_GRP_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_RESOURCE_H=1 -DHAVE_PTY_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRUCT_MSGHDR_MSG_CONTROL=1 -DHAVE_MSGHDR_MSG_CONTROL=1 -DHAVE_LINUX_NETFILTER_IPV4_H=1 -DHAVE_LIBUTIL=1 -DHAVE_LIBDL=1 -DHAVE_LIBZ=1 -DHAVE_LIBPTHREAD=1 -DUSE_PTHREAD=1 -DHAVE_SNPRINTF=1 -DHAVE_VSNPRINTF=1 -DHAVE_OPENPTY=1 -DHAVE_DAEMON=1 -DHAVE_WAITPID=1 -DHAVE_WAIT4=1 -DHAVE_SETSID=1 -DHAVE_SETGROUPS=1 -DHAVE_CHROOT=1 -DHAVE_SYSCONF=1 -DHAVE_GETRLIMIT=1 -DHAVE_PTHREAD_SIGMASK=1 -DHAVE_LOCALTIME_R=1 -DHAVE_GETCONTEXT=1 -DHAVE_POLL=1 -DHAVE_ENDHOSTENT=1 -DHAVE_GETNAMEINFO=1 -DHAVE_GETADDRINFO=1 -DHAVE_PIPE2=1 -DHAVE_ACCEPT4=1 -DHAVE_OPENSSL=1 -Dssldir=\"/usr\" -DHAVE_OSSL_ENGINE_H=1 -DUSE_IPv6=1 -DHAVE_LIBWRAP=1 -I. -I/usr/kerberos/include -DLIBDIR='"/usr/local/lib/stunnel"' -DCONFDIR='"/usr/local/etc/stunnel"' -DPIDFILE='"/usr/local/var/run/stunnel/stunnel.pid"'   -g -O2 -Wall -Wextra -pedantic -Wno-long-long -I/usr/include -MT libwrap.o -MD -MP -MF .deps/libwrap.Tpo -c -o libwrap.o libwrap.c
libwrap.c: In function 'libwrap_init':
libwrap.c:91: warning: ignoring return value of 'write', declared with attribute warn_unused_result
mv -f .deps/libwrap.Tpo .deps/libwrap.Po
/bin/sh ../libtool --tag=CC   --mode=link gcc  -g -O2 -Wall -Wextra -pedantic -Wno-long-long -I/usr/include   -o stunnel  file.o client.o log.o options.o protocol.o network.o resolver.o ssl.o ctx.o verify.o sthreads.o stunnel.o pty.o libwrap.o  -lz -ldl -lutil -lnsl  -lpthread -L/usr/lib64 -L/usr/lib -lssl -lcrypto
/bin/sh: warning: setlocale: LC_ALL: cannot change locale (c)
libtool: link: gcc -g -O2 -Wall -Wextra -pedantic -Wno-long-long -I/usr/include -o stunnel file.o client.o log.o options.o protocol.o network.o resolver.o ssl.o ctx.o verify.o sthreads.o stunnel.o pty.o libwrap.o  -lz -ldl -lutil -lnsl -lpthread -L/usr/lib64 -L/usr/lib -lssl -lcrypto
libwrap.o: In function `check':
/usr/portage/distfiles/stunnel-4.35/src/libwrap.c:194: undefined reference to `request_init'
/usr/portage/distfiles/stunnel-4.35/src/libwrap.c:195: undefined reference to `sock_host'
/usr/portage/distfiles/stunnel-4.35/src/libwrap.c:196: undefined reference to `hosts_access'
collect2: ld returned 1 exit status
make[1]: *** [stunnel] Error 1
make[1]: Leaving directory `/usr/portage/distfiles/stunnel-4.35/src'
make: *** [all-recursive] Error 1

The attached patch solves the problem; it would be cool, if you could include it in the next release.


Best regards

Stefan Behte

Babiel GmbH
Moskauer Strasse 27
D-40227 Düsseldorf

Tel:    0211-179349 0
Fax:    0211-179349 29
E-Mail: S.Behte at babiel.com
Internet: http://www.babiel.com

Geschäftsführer: Georg Babiel, Dr. Rainer Babiel, Harald Babiel
Amtsgericht Düsseldorf HRB 38633

~~~~~~~~~~~~~~ DISCLAIMER ~~~~~~~~~~~~~~~

The information transmitted in this electronic mail message may contain confidential and or privileged materials. Any review, retransmission, dissemination or other use of or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you receive such e-mails in error, please contact the sender and delete the material from any computer.




-------------- next part --------------
A non-text attachment was scrubbed...
Name: stunnel-4.35-libwrap.patch
Type: application/octet-stream
Size: 376 bytes
Desc: stunnel-4.35-libwrap.patch
URL: <http://www.stunnel.org/pipermail/stunnel-users/attachments/20110207/bc628ae9/attachment.obj>


More information about the stunnel-users mailing list