Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/usr.bin/chpass Pullup 1.20 [phil]:
details: https://anonhg.NetBSD.org/src/rev/4fa05424c4ee
branches: netbsd-1-5
changeset: 490006:4fa05424c4ee
user: tv <tv%NetBSD.org@localhost>
date: Mon Oct 30 22:45:09 2000 +0000
description:
Pullup 1.20 [phil]:
getpwuid() and getpwnam() both support YP maps, insecure and secure.
Remove local ypgetpw{uid,nam} which don't support secure maps.
(Using chpass/chfn with secure maps and these local functions turns off
users by putting * in password entry.)
diffstat:
usr.bin/chpass/chpass.c | 18 ++++--------------
1 files changed, 4 insertions(+), 14 deletions(-)
diffs (44 lines):
diff -r 98358f3e65eb -r 4fa05424c4ee usr.bin/chpass/chpass.c
--- a/usr.bin/chpass/chpass.c Mon Oct 30 22:36:33 2000 +0000
+++ b/usr.bin/chpass/chpass.c Mon Oct 30 22:45:09 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: chpass.c,v 1.18.10.1 2000/07/28 01:09:28 itojun Exp $ */
+/* $NetBSD: chpass.c,v 1.18.10.2 2000/10/30 22:45:09 tv Exp $ */
/*-
* Copyright (c) 1988, 1993, 1994
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)chpass.c 8.4 (Berkeley) 4/2/94";
#else
-__RCSID("$NetBSD: chpass.c,v 1.18.10.1 2000/07/28 01:09:28 itojun Exp $");
+__RCSID("$NetBSD: chpass.c,v 1.18.10.2 2000/10/30 22:45:09 tv Exp $");
#endif
#endif /* not lint */
@@ -187,23 +187,13 @@
if (op == EDITENTRY || op == NEWSH) {
if (username != NULL) {
-#ifdef YP
- if (use_yp)
- pw = ypgetpwnam(username);
- else
-#endif /* YP */
- pw = getpwnam(username);
+ pw = getpwnam(username);
if (pw == NULL)
errx(1, "unknown user: %s", username);
if (uid && uid != pw->pw_uid)
baduser();
} else {
-#ifdef YP
- if (use_yp)
- pw = ypgetpwuid(uid);
- else
-#endif /* YP */
- pw = getpwuid(uid);
+ pw = getpwuid(uid);
if (pw == NULL)
errx(1, "unknown user: uid %u\n", uid);
}
Home |
Main Index |
Thread Index |
Old Index