/[gnats]/gnats/gnats/gnatsd.c
ViewVC logotype

Diff of /gnats/gnats/gnatsd.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.45 by pdm, Sun Dec 23 20:22:08 2001 UTC revision 1.46 by pdm, Sun Mar 3 20:15:31 2002 UTC
# Line 257  password_match (const char *password, co Line 257  password_match (const char *password, co
257    if (! strncmp (hash, "$0$", 3))    if (! strncmp (hash, "$0$", 3))
258      {      {
259        /* explicit plain-text password */        /* explicit plain-text password */
260        return ! strcmp (password, hash+3);        return ! match (password, hash, TRUE);
261      }      }
262    else if (! strncmp (hash, "$1$", 3))    else
263      {      {
264        /* MD5 hash of the password */        /* DES crypt or MD5 hash of the password */
265  #ifdef HAVE_LIBCRYPT  #ifdef HAVE_LIBCRYPT
266        char *encrypted = crypt (password, hash);        char *encrypted = crypt (password, hash);
267        return encrypted && ! strcmp (encrypted, hash);        return encrypted && ! strcmp (encrypted, hash);
# Line 270  password_match (const char *password, co Line 270  password_match (const char *password, co
270        return FALSE;        return FALSE;
271  #endif  #endif
272      }      }
   else  
     {  
       /* default password type is plain-text */  
       return match (password, hash, TRUE);  
     }  
273  }  }
274    
275  /*  */  /*  */

Legend:
Removed from v.1.45  
changed lines
  Added in v.1.46

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26