hiding from w(1)? - (nf)
Bjorn Eriksen
ber at enea.UUCP
Mon Jun 25 01:59:53 AEST 1984
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
More information about the Comp.unix.wizards
mailing list