OpenSSH broken on HP-UX 10.x and fix

Larkin Nickle me at larbob.org
Fri Nov 5 13:33:58 AEDT 2021


OpenSSH is broken on HP-UX 10.x as the libc has an undocumented 
`getline` which is detected by configure, openbsd-compat's `getline` 
ends up not being used. This causes a segfault as soon as you try to do 
anything useful with the built binaries.

I think it could be worked around with something like this (after taking 
getline out of the long list of functions to check) in configure.ac, but 
consider this as pseudocode as I don't know much about actually writing 
m4/for autoconf:

if [ `uname` = "HP-UX" ]; then
	case `uname -r` in
		B.10.*)
			# However you explicitly define that we don't have getline.
			;;
		*)
			AC_CHECK_FUNC(getline)
			;;
	esac
fi

With this resolved, OpenSSH compiles and works perfectly (tested with 
GCC 4.2.4 on 10.20).

$ nc 192.168.1.110 22
SSH-2.0-OpenSSH_8.8
^C
$ ssh 192.168.1.110 uname -a
HP-UX alouette B.10.20 U 9000/777 2014502315 unlimited-user license


More information about the openssh-unix-dev mailing list