]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(_nss_nis_getpwnam_r): Correct test for invalid password.
authorUlrich Drepper <drepper@redhat.com>
Tue, 1 Sep 1998 18:32:42 +0000 (18:32 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 1 Sep 1998 18:32:42 +0000 (18:32 +0000)
(_nss_nis_getpwuid_r): Likewise.

nis/nss_nis/nis-pwd.c

index ecb06fede0b8b6a501a9f79283baaaaae5a9d681..d8960740b8653b76d8974733e2e04fc140330f95 100644 (file)
@@ -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)
        {