|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T d
Length: 621 (0x26d)
Types: TextFile
Names: »disable.c«
└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki
└─⟦this⟧ »EUUGD11/euug-87hel/sec8/mcp/src/disable.c«
#include <sys/types.h>
#include <lastlog.h>
#include "sysdep.h"
#include "mem.h"
#include "lists.h"
#include "account.h"
#include "save.h"
extern int ModBits;
disableuser(c, v)
int c;
addr *v;
{
struct account *ac;
if ( c > 2 ) {
err1("%s: too many arguments", (char *)v[0]);
return;
}
if (c != 2) {
err1("usage: %s <user>", (char *)v[0]);
return;
}
ac = getacnam((char *)v[1]);
if (!ac) {
err1("%s: no such user", (char *)v[1]);
return;
}
critical();
FREEMEM((char *)ac->ac_shell);
savestr((char **)&ac->ac_shell, DISABLED_SH);
ModBits |= PW;
puts("disabled");
non_critical();
return;
}