/[gnats]/gnats/gnats/gnats-pwconv.c
ViewVC logotype

Diff of /gnats/gnats/gnats-pwconv.c

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

revision 1.2 by pdm, Mon Dec 10 21:56:20 2001 UTC revision 1.3 by pdm, Sun Jul 14 17:29:48 2002 UTC
# Line 1  Line 1 
1  /* GNATS password conversion tool.  /* GNATS password conversion tool.
2     Copyright (C) 2001 Yngve Svendsen.     Copyright (C) 2001, 2002 Free Software Foundation, Inc.
    Copyright (C) 2001 Milan Zamazal.  
3    
4  This file is part of GNU GNATS.  This file is part of GNU GNATS.
5    
# Line 146  encrypt_ (char *clearpwstring, Crypt_Typ Line 145  encrypt_ (char *clearpwstring, Crypt_Typ
145      case CRYPT:            case CRYPT:      
146        strncpy (salt, rawsalt, 2);        strncpy (salt, rawsalt, 2);
147        salt[2] = '\0';        salt[2] = '\0';
148        result = asprintf (newpwentry, "%s%s",        result = asprintf (newpwentry, "%s", crypt (clearpwstring, salt));
                          salt, crypt (clearpwstring, salt));  
149        break;        break;
150                
151      case MD5:      case MD5:
152        sprintf (salt, "$1$%s", rawsalt);        sprintf (salt, "$1$%s", rawsalt);
153        result = asprintf (newpwentry, "%s%s",        result = asprintf (newpwentry, "%s", crypt (clearpwstring, salt));
                          salt, crypt (clearpwstring, salt));  
154        break;        break;
155  #endif  #endif
156                

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

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