Changeset devel,72 for devel/crypting.c

Show
Ignore:
Timestamp:
2005-12-09T20:48:45Z (5 years ago)
Author:
Jelmer Vernooij <jelmer@…>
branch-nick:
integration
parents:
RevTreeChgset
71@devel,71[devel,71]
68.1.7@devel,68.1.7[devel,68.1.7]
revision id:
jelmer@samba.org-20051209204845-36cf562c93b48ed2
Message:

Merge my storage abstraction changes

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • devel/crypting.c

    r71 r68.1.6  
    5252#include <stdlib.h> 
    5353 
    54 #define irc_usermsg 
    55  
    5654#endif 
    5755 
     
    6260\*/ 
    6361 
    64 /* USE WITH CAUTION! 
    65    Sets pass without checking */ 
    66 void setpassnc (irc_t *irc, const char *pass)  
    67 { 
    68         if (irc->password) g_free (irc->password); 
    69          
    70         if (pass) { 
    71                 irc->password = g_strdup (pass); 
    72                 irc_usermsg (irc, "Password successfully changed"); 
    73         } else { 
    74                 irc->password = NULL; 
    75         } 
    76 } 
    77  
    78 int setpass (irc_t *irc, const char *pass, const char* md5sum)  
     62int checkpass (const char *pass, const char *md5sum) 
    7963{ 
    8064        md5_state_t md5state; 
     
    9478                if (digits[1] != md5sum[j + 1]) return (-1); 
    9579        } 
    96          
    97         /* If pass is correct, we end up here and we set the pass */ 
    98         setpassnc (irc, pass); 
    99          
    100         return (0); 
    101 } 
     80 
     81        return( 0 ); 
     82} 
     83 
    10284 
    10385char *hashpass (irc_t *irc) {