From d8a7a1fff98e0500c91cc3034cd88f9f8bbaa4f7 Mon Sep 17 00:00:00 2001 From: David Nugent Date: Tue, 26 Oct 1999 08:34:09 +0000 Subject: Add new functionality "lock" and "unlock" to provide a simple password locking mechanism for users. This works by prepending the string "*LOCKED*" to the password field in master.passwd to prevent successful decoding. --- pw/pw_group.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'pw/pw_group.c') diff --git a/pw/pw_group.c b/pw/pw_group.c index 54125d8..d489a6b 100644 --- a/pw/pw_group.c +++ b/pw/pw_group.c @@ -60,12 +60,14 @@ pw_group(struct userconf * cnf, int mode, struct cargs * args) NULL }; + if (mode == M_LOCK || mode == M_UNLOCK) + errx(EX_USAGE, "'lock' command is not available for groups"); + /* * With M_NEXT, we only need to return the * next gid to stdout */ - if (mode == M_NEXT) - { + if (mode == M_NEXT) { gid_t next = gr_gidpolicy(cnf, args); if (getarg(args, 'q')) return next; -- cgit v1.2.3