diff options
author | 1999-10-26 08:34:09 +0000 | |
---|---|---|
committer | 1999-10-26 08:34:09 +0000 | |
commit | d8a7a1fff98e0500c91cc3034cd88f9f8bbaa4f7 (patch) | |
tree | af4aeba732ff91f2085c9cdcf75787b96ecfce85 /pw/pw_group.c | |
parent | c024324408701116d70a6ebc327da9edf2173488 (diff) | |
download | pw-darwin-d8a7a1fff98e0500c91cc3034cd88f9f8bbaa4f7.tar.gz pw-darwin-d8a7a1fff98e0500c91cc3034cd88f9f8bbaa4f7.tar.zst pw-darwin-d8a7a1fff98e0500c91cc3034cd88f9f8bbaa4f7.zip |
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.
Diffstat (limited to 'pw/pw_group.c')
-rw-r--r-- | pw/pw_group.c | 6 |
1 files changed, 4 insertions, 2 deletions
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; |