gnats-diffs
[Top][All Lists]
Advanced

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

Changes to gnats/gnats/gnatsd.c


From: Milan Zamazal
Subject: Changes to gnats/gnats/gnatsd.c
Date: Sun, 03 Mar 2002 15:15:31 -0500

Index: gnats/gnats/gnatsd.c
diff -c gnats/gnats/gnatsd.c:1.45 gnats/gnats/gnatsd.c:1.46
*** gnats/gnats/gnatsd.c:1.45   Sun Dec 23 15:22:08 2001
--- gnats/gnats/gnatsd.c        Sun Mar  3 15:15:31 2002
***************
*** 257,267 ****
    if (! strncmp (hash, "$0$", 3))
      {
        /* explicit plain-text password */
!       return ! strcmp (password, hash+3);
      }
!   else if (! strncmp (hash, "$1$", 3))
      {
!       /* MD5 hash of the password */
  #ifdef HAVE_LIBCRYPT
        char *encrypted = crypt (password, hash);
        return encrypted && ! strcmp (encrypted, hash);
--- 257,267 ----
    if (! strncmp (hash, "$0$", 3))
      {
        /* explicit plain-text password */
!       return ! match (password, hash, TRUE);
      }
!   else
      {
!       /* DES crypt or MD5 hash of the password */
  #ifdef HAVE_LIBCRYPT
        char *encrypted = crypt (password, hash);
        return encrypted && ! strcmp (encrypted, hash);
***************
*** 269,279 ****
        /* TODO: log some warning */
        return FALSE;
  #endif
-     }
-   else
-     {
-       /* default password type is plain-text */
-       return match (password, hash, TRUE);
      }
  }
  
--- 269,274 ----



reply via email to

[Prev in Thread] Current Thread [Next in Thread]