diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-12-08 17:00:08 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2005-12-08 17:00:08 +0100 |
commit | 7cad7b41a0b661c38ae5f6239aaf58361788edc9 (patch) | |
tree | 213ab238ece2ab120b7ec25f62b19224b37d6856 /storage_text.c | |
parent | 09adf08684c62fff0f507304ed37680137de4637 (diff) |
Clearer seperation between crypting and generic password code
Diffstat (limited to 'storage_text.c')
-rw-r--r-- | storage_text.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/storage_text.c b/storage_text.c index 004e891c..f3ca8a38 100644 --- a/storage_text.c +++ b/storage_text.c @@ -52,7 +52,8 @@ static storage_status_t text_load ( const char *my_nick, const char* password, i if( !fp ) return STORAGE_NO_SUCH_USER; fscanf( fp, "%32[^\n]s", s ); - if( setpass( irc, password, s ) < 0 ) + + if (checkpass (password, s) != 0) { fclose( fp ); return STORAGE_INVALID_PASSWORD; @@ -276,7 +277,8 @@ static storage_status_t text_check_pass( const char *nick, const char *password fscanf( fp, "%32[^\n]s", s ); fclose( fp ); - /*FIXME: Check password */ + if (checkpass( password, s) == -1) + return STORAGE_INVALID_PASSWORD; return STORAGE_OK; } |