r2246: Some good fixes for HPUX from JBravo on #samba-technical: