ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid-8/src/conf.c
(Generate patch)

Comparing ircd-hybrid-8/src/conf.c (file contents):
Revision 1389 by michael, Tue May 1 13:08:29 2012 UTC vs.
Revision 1390 by michael, Tue May 1 13:39:18 2012 UTC

# Line 3316 | Line 3316 | match_conf_password(const char *password
3316   {
3317    const char *encr = NULL;
3318  
3319 <  if (password == NULL || aconf->passwd == NULL)
3319 >  if (EmptyString(password) || EmptyString(aconf->passwd))
3320      return 0;
3321  
3322    if (aconf->flags & CONF_FLAGS_ENCRYPTED)
3323 <  {
3324 <    /* use first two chars of the password they send in as salt */
3325 <    /* If the password in the conf is MD5, and ircd is linked
3326 <     * to scrypt on FreeBSD, or the standard crypt library on
3327 <     * glibc Linux, then this code will work fine on generating
3328 <     * the proper encrypted hash for comparison.
3329 <     */
3330 <    if (*aconf->passwd)
3331 <      encr = crypt(password, aconf->passwd);
3332 <    else
3333 <      encr = "";
3334 <  }
3323 >    encr = crypt(password, aconf->passwd);
3324    else
3325      encr = password;
3326  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines