summaryrefslogtreecommitdiffstats
path: root/chpass/chpass.c
diff options
context:
space:
mode:
authorBill Paul <wpaul@FreeBSD.org>1996-05-25 01:05:17 +0000
committerBill Paul <wpaul@FreeBSD.org>1996-05-25 01:05:17 +0000
commit4d24253ba81731af4b869a386e0ba38f79b66688 (patch)
tree6cb428504e8c14de59e2b52eb6016cf4561bddf6 /chpass/chpass.c
parent346a63c95a04ba84385c7ffbf97538523c4885f1 (diff)
downloadpw-darwin-4d24253ba81731af4b869a386e0ba38f79b66688.tar.gz
pw-darwin-4d24253ba81731af4b869a386e0ba38f79b66688.tar.zst
pw-darwin-4d24253ba81731af4b869a386e0ba38f79b66688.zip
Fix the -l flag. For some reason I can't fathom, I left in some code
that would cause it to fail if anyone but the superuser tried to use it. Also fix a couple of harmless typos since I'm in the area.
Diffstat (limited to 'chpass/chpass.c')
-rw-r--r--chpass/chpass.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/chpass/chpass.c b/chpass/chpass.c
index 17d742a..f353b33 100644
--- a/chpass/chpass.c
+++ b/chpass/chpass.c
@@ -40,7 +40,7 @@ static char copyright[] =
#ifndef lint
static char sccsid[] = "From: @(#)chpass.c 8.4 (Berkeley) 4/2/94";
static char rcsid[] =
- "$Id: chpass.c,v 1.5 1996/02/23 14:33:05 wpaul Exp $";
+ "$Id: chpass.c,v 1.7 1996/02/23 16:08:56 wpaul Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -112,9 +112,9 @@ main(argc, argv)
break;
#ifdef YP
case 'h':
-#ifdef PARAMOID
+#ifdef PARANOID
if (getuid()) {
- warnx("Only the superuser can use the -d flag");
+ warnx("Only the superuser can use the -h flag");
} else {
#endif
yp_server = optarg;
@@ -136,11 +136,8 @@ main(argc, argv)
#endif
break;
case 'l':
- if (getuid()) {
- warnx("Only the superuser can use the -h flag");
- } else {
- force_local = 1;
- }
+ _use_yp = 0;
+ force_local = 1;
break;
case 'y':
_use_yp = force_yp = 1;