From 1ca4ade9cf346b4f12e3cf4185083ec6c59e5460 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 1 Sep 1998 18:32:42 +0000 Subject: [PATCH] (_nss_nis_getpwnam_r): Correct test for invalid password. (_nss_nis_getpwuid_r): Likewise. --- nis/nss_nis/nis-pwd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nis/nss_nis/nis-pwd.c b/nis/nss_nis/nis-pwd.c index ecb06fede0b..d8960740b86 100644 --- a/nis/nss_nis/nis-pwd.c +++ b/nis/nss_nis/nis-pwd.c @@ -249,7 +249,7 @@ _nss_nis_getpwnam_r (const char *name, struct passwd *pwd, char *endp, *tmp; size_t restlen; - if (encrypted != NULL + if (encrypted == NULL || (endp = strchr (++encrypted, ':')) == NULL || (p = strchr (p + 1, ':')) == NULL) { @@ -348,7 +348,7 @@ _nss_nis_getpwuid_r (uid_t uid, struct passwd *pwd, char *endp, *tmp; size_t restlen; - if (encrypted != NULL + if (encrypted == NULL || (endp = strchr (++encrypted, ':')) == NULL || (p = strchr (p + 1, ':')) == NULL) { -- 2.47.2