diff options
| author | David Nugent <davidn@FreeBSD.org> | 1999-10-26 08:34:09 +0000 |
|---|---|---|
| committer | David Nugent <davidn@FreeBSD.org> | 1999-10-26 08:34:09 +0000 |
| commit | 6d9a1b6caae301dc8c6b0d18e8c5d3ef931d1ea5 (patch) | |
| tree | 1796accc4d8a1a2f9fe1158620c5e0cb3246c44d /pw/pw_group.c | |
| parent | 72ce339a913df5506bb3433e522e71c20febec7f (diff) | |
| download | pw-darwin-6d9a1b6caae301dc8c6b0d18e8c5d3ef931d1ea5.tar.gz pw-darwin-6d9a1b6caae301dc8c6b0d18e8c5d3ef931d1ea5.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; |
