1

I have compiled a stunnel build on hpux with those options

./configure \
  --prefix=/opt/stunnel \
  --sbindir=/opt/stunnel/sbin \
  --mandir=/opt/stunnel/man \
  --docdir=/opt/stunnel/doc \
  --localstatedir=/var/opt/stunnel \
  --with-ssl=/usr/local \
  --disable-libwrap

The build has success,but stunnel won't start

/opt/stunnel/bin/stunnel /etc/opt/stunnel/stunnel.conf
[ ] Clients allowed=1000
[.] stunnel 5.50 on ia64-hp-hpux11.31 platform
[.] Compiled with OpenSSL 1.0.2q  20 Nov 2018
[.] Running  with OpenSSL 1.0.2k  26 Jan 2017
[.] Threading:PTHREAD Sockets:POLL,IPv6 TLS:ENGINE,FIPS,OCSP,PSK,SNI
[ ] errno: (*__errno())
[!] Invalid configuration file name "/etc/opt/stunnel/stunnel.conf"
[!] realpath: Invalid argument (22)
[ ] Deallocating section defaults

The configuration file is correct,because works fine on linux and solaris with the same version. I see those two lines:

[.] Compiled with OpenSSL 1.0.2q  20 Nov 2018
[.] Running  with OpenSSL 1.0.2k  26 Jan 2017

I have two versions of openssl,and of course is impossible to remove both or only once because break a lot of deps. I have also tried to change line

  --with-ssl=/usr/local \

with

  --with-ssl=/opt/openssl\

and..doesn't work. Same error

/opt/stunnel/bin/stunnel /etc/opt/stunnel/stunnel.conf
[ ] Clients allowed=1000
[.] stunnel 5.50 on ia64-hp-hpux11.31 platform
[.] Compiled/running with OpenSSL 1.0.2k  26 Jan 2017
[.] Threading:PTHREAD Sockets:POLL,IPv6 TLS:ENGINE,FIPS,OCSP,PSK,SNI
[ ] errno: (*__errno())
[!] Invalid configuration file name "/etc/opt/stunnel/stunnel.conf"
[!] realpath: Invalid argument (22)
[ ] Deallocating section defaults

This is the file conf.

#server
chroot = /var/opt/stunnel
setuid = stunnel
setgid = stunnel
pid = /stunnel.pid
debug = 1
foreground = no
cert = /etc/ssl/certs/stunnel.pem
key = /etc/ssl/private/stunnel.pem
options = NO_SSLv2
options = NO_SSLv3
sslVersion = TLSv1.2
[TELNET]
accept=0.0.0.0:5853
connect=localhost:23
elbarna
  • 12,050
  • 22
  • 92
  • 170

1 Answers1

1

According to HP-UX 11.31 man pages, the Invalid argument error (EINVAL) from realpath(3X) call means that either the pointer to the pathname to be resolved or to the buffer for the resolved name is NULL.

That might be some sort of pointer handling bug in the part of code that checks the validity of the configuration file name. That might also explain the previous Invalid configuration file name error message too.

telcoM
  • 87,318
  • 3
  • 112
  • 232