We don't have a setproctitle() replacement for most unices which lack it
Created attachment 93 [details] setproctitle() replacement for more OSs
This seems to work on Linux and I have had reports of it working on other platforms too. Please test this patch and report here or on the list. I'd like to get this in for the next version.
Patch id 93 works on AIX (tested 4.2.1, 4.3.3 & 5.1). It does not work on Solaris (tested 7, 8). sshd still works, but ps still shows the original arguments.
I'm using this patch for AIX 4.3.3 and it works perfectly. I'm also using it on HPUX 10 and 11 (will try 11i soon) but I need to make some modifications in config.h after running configure. (add a define for HAVE_SYS_PSTAT_H) and make sure HAVE_PSTAT is set in some way (my way is not really clean) otherwise support will still be disabled.
I have committed this - it will switch on For Linux, AIX and HP/UX (If I got the configure logic correct). Switching it on for other platforms is simply a matter of editing openbsd-compat/setproctitle.c and twiddling the #ifdef maze
how does one munge process string in solaris? also, i think it would be better to set method per-platform in configure.ac rather than growing the ifdef maze: AC_DEFINE(SPT_TYPE,PS_USE_CLOBBER_ARGV)
The original source said to use argv clobbering for Solaris, but that didn't seem to work (see Comment #3) so I just disabled it. I have moved all the platform selection to configure.ac - it is a better place for it. If you don't define a SETPROCTITLE_STRATEGY (and optionally a SETPROCTITLE_PS_PADDING), it will switch off setproctitle emulation.
Further info on Solaris: /usr/bin/ps apparently won't display the modified arguments while /usr/ucb/ps will. I knew they were different but I didn't know about that particular difference. I haven't been able to get it working on Solaris after adding "#define SETPROCTITLE_STRATEGY PS_USE_CLOBBER_ARGV" (it core dumps) but I suspect I'm doing something dumb.
You might want to set SETPROCTITLE_PS_PADDING as well (see the linux section in configure.ac). I suggest that you file a new bug for Solaris, so we can stop flogging this one :)
I tried both ' ' and '\0' but didn't want to clutter this bug. I'll file a new bug when I'm convinced I'm not doing something wrong (I've had *really* strange problems since upgrading to openssl-0.9.7 which I'm still trying to figure out).
Mass change of RESOLVED bugs to CLOSED