From: Adolf Belka Date: Tue, 6 May 2025 14:10:11 +0000 (+0200) Subject: chpasswd.cgi: Make swroot refs the same as for other cgi files X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4c39e38f90fea60ef62e07267fd84f1b89de0297;p=people%2Fmfischer%2Fipfire-2.x.git chpasswd.cgi: Make swroot refs the same as for other cgi files - This uses the swroot definition from general-functions.pl and makes the definition the same as used in the majority of other IPFire cgi files. Tested-by: Adolf Belka Signed-off-by: Adolf Belka Signed-off-by: Michael Tremer --- diff --git a/html/cgi-bin/chpasswd.cgi b/html/cgi-bin/chpasswd.cgi index bda693193..6e9dd9e1c 100644 --- a/html/cgi-bin/chpasswd.cgi +++ b/html/cgi-bin/chpasswd.cgi @@ -21,7 +21,7 @@ use CGI qw(param); -$swroot = "/var/ipfire"; +require '/var/ipfire/general-functions.pl'; my %cgiparams; my %mainsettings; @@ -30,8 +30,8 @@ my %proxysettings; $proxysettings{'NCSA_MIN_PASS_LEN'} = 6; ### Initialize environment -&readhash("${swroot}/main/settings", \%mainsettings); -&readhash("${swroot}/proxy/advanced/settings", \%proxysettings); +&readhash("${General::swroot}/main/settings", \%mainsettings); +&readhash("${General::swroot}/proxy/advanced/settings", \%proxysettings); $language = $mainsettings{'LANGUAGE'}; ### Initialize language @@ -40,12 +40,12 @@ if ($language =~ /^(\w+)$/) {$language = $1;} # Uncomment this to force a certain language: # $language='en'; # -require "${swroot}/langs/en.pl"; -require "${swroot}/langs/${language}.pl"; +require "${General::swroot}/langs/en.pl"; +require "${General::swroot}/langs/${language}.pl"; -my $userdb = "$swroot/proxy/advanced/ncsa/passwd"; +my $userdb = "$General::swroot/proxy/advanced/ncsa/passwd"; -&readhash("$swroot/ethernet/settings", \%netsettings); +&readhash("$General::swroot/ethernet/settings", \%netsettings); my $success = 0;