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 Revert pullup of 1.20 [releng].



details:   https://anonhg.NetBSD.org/src/rev/bd0c63fdee63
branches:  netbsd-1-5
changeset: 490240:bd0c63fdee63
user:      tv <tv%NetBSD.org@localhost>
date:      Wed Nov 15 18:54:39 2000 +0000

description:
Revert pullup of 1.20 [releng].
This causes other issues that need to be addressed as part of a more complete
change in 1.5.1.

diffstat:

 usr.bin/chpass/chpass.c |  18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diffs (44 lines):

diff -r f491ecfb17db -r bd0c63fdee63 usr.bin/chpass/chpass.c
--- a/usr.bin/chpass/chpass.c   Wed Nov 15 18:53:39 2000 +0000
+++ b/usr.bin/chpass/chpass.c   Wed Nov 15 18:54:39 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: chpass.c,v 1.18.10.2 2000/10/30 22:45:09 tv Exp $      */
+/*     $NetBSD: chpass.c,v 1.18.10.3 2000/11/15 18:54:39 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.2 2000/10/30 22:45:09 tv Exp $");
+__RCSID("$NetBSD: chpass.c,v 1.18.10.3 2000/11/15 18:54:39 tv Exp $");
 #endif
 #endif /* not lint */
 
@@ -187,13 +187,23 @@
 
        if (op == EDITENTRY || op == NEWSH) {
                if (username != NULL) {
-                       pw = getpwnam(username);
+#ifdef YP
+                       if (use_yp)
+                               pw = ypgetpwnam(username);
+                       else
+#endif /* YP */
+                               pw = getpwnam(username);
                        if (pw == NULL)
                                errx(1, "unknown user: %s", username);
                        if (uid && uid != pw->pw_uid)
                                baduser();
                } else {
-                       pw = getpwuid(uid);
+#ifdef YP
+                       if (use_yp)
+                               pw = ypgetpwuid(uid);
+                       else
+#endif /* YP */
+                               pw = getpwuid(uid);
                        if (pw == NULL)
                                errx(1, "unknown user: uid %u\n", uid);
                }



Home | Main Index | Thread Index | Old Index