From: nishi Date: Mon, 15 Apr 2024 02:42:52 +0000 (+0000) Subject: fix typo X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=8fe74f939328635d05ce02366d9b690ed65ecf92;p=mandshurica.git fix typo git-svn-id: file:///raid/svn-main/nishi-mandshurica/trunk@28 f982e544-4a7d-3444-ad1a-fde59a2a69f1 --- diff --git a/Mandshurica/config.c b/Mandshurica/config.c index 9811011..b1d3a23 100644 --- a/Mandshurica/config.c +++ b/Mandshurica/config.c @@ -199,6 +199,7 @@ int mandshurica_create_config(const char* path) { fprintf(f, "# Generated by Mandshurica " MANDSHURICA_VERSION "\n"); fprintf(f, "ServerRoot %s\n", PREFIX); fprintf(f, "\n"); + fprintf(f, "Set BasicDB %s/passwd.db\n", PREFIX); fprintf(f, "Set HTTPPort 1024\n"); fprintf(f, "Set HTTPRoot %s\n", WEBROOT_PREFIX); fprintf(f, "\n"); diff --git a/Module/http.c b/Module/http.c index b241a14..c181056 100644 --- a/Module/http.c +++ b/Module/http.c @@ -90,7 +90,7 @@ int mod_init(struct mandshurica_config* _config) { } if(count == 1) { - log = mandshurica_strcat("HTTP Server available uthentication method is ", auth[0] == 0 ? "(none)" : auth); + log = mandshurica_strcat("HTTP Server available authentication method is ", auth[0] == 0 ? "(none)" : auth); } else { log = mandshurica_strcat("HTTP Server available authentication methods are ", auth[0] == 0 ? "(none)" : auth); } diff --git a/mkpasswd.pl b/mkpasswd.pl index 12a3d54..0722128 100755 --- a/mkpasswd.pl +++ b/mkpasswd.pl @@ -1,33 +1,33 @@ #!/usr/bin/env perl # $Id$ -use Digest::SHA qw(sha256 sha256_hex); +use Digest::SHA qw(sha512 sha512_hex); require Term::ReadKey; if(@ARGV < 1) { - print "Pass me username\n"; + print STDERR "Pass me username\n"; exit 1 } -print "Password: "; +print STDERR "Password: "; Term::ReadKey::ReadMode("noecho"); my $password = Term::ReadKey::ReadLine(0); -print "\n"; -print "Verify Password: "; +print STDERR "\n"; +print STDERR "Verify Password: "; my $verify = Term::ReadKey::ReadLine(0); -print "\n"; +print STDERR "\n"; if ($password eq $verify) { - my $digest = sha256_hex($password); + my $digest = sha512_hex($password); print "$ARGV[0]:$digest\n"; } else { - print "Unmatched\n"; + print STDERR "Unmatched\n"; exit 1 }