From: nishi Date: Sat, 11 May 2024 09:22:16 +0000 (+0000) Subject: return MS_AUTH_FAIL instead of MS_AUTH_ERROR X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=c203103de81234d88d660566fb707560c28954f9;p=mandshurica.git return MS_AUTH_FAIL instead of MS_AUTH_ERROR git-svn-id: file:///raid/svn-main/nishi-mandshurica/trunk@87 f982e544-4a7d-3444-ad1a-fde59a2a69f1 --- diff --git a/Module/cookie.c b/Module/cookie.c index 7daae93..39a2fbb 100644 --- a/Module/cookie.c +++ b/Module/cookie.c @@ -112,7 +112,7 @@ int mod_auth(const char* username, const char* password, char** ptr) { char* pwd = mandshurica_db_get(db, username); if(pwd == NULL) { mandshurica_db_close(db); - return MS_AUTH_ERROR; + return MS_AUTH_FAIL; } else { char* sh = config->mandshurica_sha512(password); if(strcmp(sh, pwd) == 0) { diff --git a/mkpasswd.pl b/mkpasswd.pl index 2e662f4..d4dc113 100755 --- a/mkpasswd.pl +++ b/mkpasswd.pl @@ -1,6 +1,8 @@ #!/usr/bin/env perl # $Id$ +# Legacy tool ; will be replaced with C one soon. + use Digest::SHA qw(sha512 sha512_hex); require Term::ReadKey;