Changes in crypting.c [7cad7b4:c2295f7]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
crypting.c
r7cad7b4 rc2295f7 52 52 #include <stdlib.h> 53 53 54 #define irc_usermsg 55 54 56 #endif 55 57 … … 60 62 \*/ 61 63 62 int checkpass (const char *pass, const char *md5sum) 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) 63 79 { 64 80 md5_state_t md5state; … … 78 94 if (digits[1] != md5sum[j + 1]) return (-1); 79 95 } 80 81 return( 0 ); 82 } 83 96 97 /* If pass is correct, we end up here and we set the pass */ 98 setpassnc (irc, pass); 99 100 return (0); 101 } 84 102 85 103 char *hashpass (irc_t *irc) {
Note: See TracChangeset
for help on using the changeset viewer.