Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83 (MC840302); site enea.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!hao!hplabs!sdcrdcf!sdcsvax!akgua!mcnc!decvax!mcvax!enea!ber From: ber@enea.UUCP (Bjorn Eriksen) Newsgroups: net.unix-wizards Subject: Re: hiding from w(1)? - (nf) Message-ID: <420@enea.UUCP> Date: Sun, 24-Jun-84 11:59:53 EDT Article-I.D.: enea.420 Posted: Sun Jun 24 11:59:53 1984 Date-Received: Wed, 27-Jun-84 02:53:03 EDT References: <2703@sdcattb.UUCP> <31700006@uiucuxc.UUCP> Organization: ENEA DATA, Sweden Lines: 26 What we have done is to use two differnet versions of w and ps respectivly. The original ones has been moved to /etc and can only be used by root or a special group of people (group staff). The versions that are runnable by ordinary users doesn't display the arguments only the command. The modifications are simple (4.2BSD): In w: 286c286 < strcpy(doing, lflag ? pr[i].w_args : pr[i].w_comm); --- > strcpy(doing, /*lflag ? pr[i].w_args :*/ pr[i].w_comm); and in ps.c you let the routine getcmd always return with only the command name: /* if (cflg) { */ (void) strncpy(cmdbuf, u.u_comm, sizeof (u.u_comm)); return (savestr(cmdbuf)); /* } */ -- Bjorn Eriksen ENEA DATA Sweden UUCP: {decvax,philabs}!mcvax!enea!ber