#571989 stunnel4: delayed DNS lookups fail with chroot

Package:
stunnel4
Source:
stunnel4
Description:
Universal SSL tunnnel for network daemons - compatibility package
Submitter:
Arnaud Giersch
Date:
2011-10-26 20:57:03 UTC
Severity:
normal
#571989#5
Date:
2010-02-28 18:36:59 UTC
From:
To:
Hi,

I am using stunnel in client mode.

With this setup, DNS lookups are delayed for the 'connect' option,
either when the name cannot be resolved at start-up, or with the 'delay'
option.

If stunnel is running in a chroot jail, these delayed DNS lookups fail,
with the following error message:

2010.02.28 18:42:07 LOG3[10723:139869934450960]: Error resolving 'smtps.xxx.fr': Neither nodename nor servname known (EAI_NONAME)
2010.02.28 18:44:35 LOG3[10989:140489145784592]: No host resolved

AFAICT, at least /etc/resolv.conf needs to be copied in the chroot
directory.  I am however not sure that it is sufficient, and I did not
find anything in the docs about this problem.

Regards,

        Arnaud Giersch

#571989#10
Date:
2011-10-26 20:43:41 UTC
From:
To:
Hi Guys,

Options "chroot", "setuid" and "setgid" may break some other
features.  I think it's a limitation of current architecture rather
than a bug.  The only portable (not depending on the installed
resolver library) would be to implement a separate set of resolver
processes.  My recommendation is to just turn chroot off.

Best regards,
	Michal Trojnara