Subject: Re: setting proc title on solaris 2.5 [wu 2.4 beta 11]

From: [email-masked] (William L. Sebok)
Date: Mon, 16 Dec 1996 17:30:56 -0500 (EST)

Neal S. Pressman <[email-masked]>, speaking of some SETPROCTITLE
code says:
> i found simillar code in ftpd.c 
> 
> but i cannot get this to work has anyone else done this with solaris 2.5
> before??? 

Process info set by SETPROCTITLE code will not be visible in Solaris 2.X with
the standard "ps" command /usr/bin/ps.  However, you will be able to see this
info if you use /usr/ucb/ps.  Whether this is a bug or a feature is a matter
of opinion. It does prevent hackers from hiding what they are up to.

Bill Sebok      Computer Software Manager, Univ. of Maryland, Astronomy
	Internet: [email-masked]	URL: http://www.astro.umd.edu/~wls/

---

From: [email-masked] (Neal S. Pressman ex 2317)
Date: Tue, 17 Dec 96 08:41:33 EST

i looked at my ftpcount.c src file and found it is different from yours.
*** 226,233 ****
            stat = kill(buf[which], SIGCONT);
            if (((stat == -1) && (errno == EPERM)) || !stat) {
                if (strcmp(progname,"ftpcount")) {
#if defined(SVR4) || defined (M_UNIX)
                    sprintf(line,"/bin/ps -f -p %d",buf[which]);
#else
                    sprintf(line,"/bin/ps %d",buf[which]);
#endif

i applied your sugested change but i still only get :
Service class mel_ftp: 
     ftp  7876   143  1 08:43:51 ?        0:00 in.ftpd -adolLi
   -   1 users ( 50 maximum)

am i missing a lib file perhaps??????

	Neal...

-> I did this with wu-ftp 2.4 and it seems to work better (it isn't as
-> nice as you get with Sunos 4.1.x, but it is better):
-> 
-> diff -c ftpcount.c.orig ftpcount.c
-> *** ftpcount.c.orig     Wed May 22 10:36:01 1996
-> --- ftpcount.c  Wed May 22 10:38:06 1996
-> ***************
-> *** 205,211 ****
->               stat = kill(buf[which], SIGCONT);
->               if (((stat == -1) && (errno == EPERM)) || !stat) {
->                   if (strcmp(progname,"ftpcount")) {
-> ! #if defined(SVR4)
->                       sprintf(line,"/bin/ps -l -p %d",buf[which]);
->   #elif defined(M_UNIX)
->                       sprintf(line,"/bin/ps -f -p %d",buf[which]);
-> --- 205,213 ----
->               stat = kill(buf[which], SIGCONT);
->               if (((stat == -1) && (errno == EPERM)) || !stat) {
->                   if (strcmp(progname,"ftpcount")) {
-> ! #if defined(SOLARIS_21)
-> !                     sprintf(line,"/usr/ucb/ps -w %d",buf[which]);
-> ! #elif defined(SVR4)
->                       sprintf(line,"/bin/ps -l -p %d",buf[which]);
->   #elif defined(M_UNIX)
->                       sprintf(line,"/bin/ps -f -p %d",buf[which]);
-> 
-> Jim