Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libutil Fix typo. This probably would have stopped passw...



details:   https://anonhg.NetBSD.org/src/rev/376ac7b48ab7
branches:  trunk
changeset: 494503:376ac7b48ab7
user:      ad <ad%NetBSD.org@localhost>
date:      Fri Jul 07 10:32:48 2000 +0000

description:
Fix typo. This probably would have stopped passwd(1) working if
/etc/passwd.conf didn't exist.

diffstat:

 lib/libutil/passwd.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r cc0cce841c36 -r 376ac7b48ab7 lib/libutil/passwd.c
--- a/lib/libutil/passwd.c      Fri Jul 07 09:53:28 2000 +0000
+++ b/lib/libutil/passwd.c      Fri Jul 07 10:32:48 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: passwd.c,v 1.22 2000/07/06 13:39:47 ad Exp $   */
+/*     $NetBSD: passwd.c,v 1.23 2000/07/07 10:32:48 ad Exp $   */
 
 /*
  * Copyright (c) 1987, 1993, 1994, 1995
@@ -35,7 +35,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: passwd.c,v 1.22 2000/07/06 13:39:47 ad Exp $");
+__RCSID("$NetBSD: passwd.c,v 1.23 2000/07/07 10:32:48 ad Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
@@ -410,7 +410,7 @@
 
        if ((fp = fopen(_PATH_PASSWDCONF, "r")) == NULL) {
                if ((cp = pw_default(option)) != NULL)
-                       strlcpy(data, p, max);
+                       strlcpy(data, cp, max);
                else
                        data[0] = '\0';
                return;
@@ -452,7 +452,7 @@
 
        if (strlen(result) == 0 && strcmp(key, "default") == 0 &&
            (cp = pw_default(option)) != NULL)
-               strlcpy(data, p, max);
+               strlcpy(data, cp, max);
        else 
                strlcpy(data, result, max);
 }



Home | Main Index | Thread Index | Old Index