From patchwork Tue May 6 14:10:11 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 8705 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R10" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4ZsKzp30mDz3x4T for ; Tue, 6 May 2025 14:10:30 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "E5" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4ZsKzk3V7kz6WN for ; Tue, 6 May 2025 14:10:26 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4ZsKzk1Bxxz33cg for ; Tue, 6 May 2025 14:10:26 +0000 (UTC) X-Original-To: development@lists.ipfire.org Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R10" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4ZsKzg0GMWz33jF for ; Tue, 6 May 2025 14:10:23 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4ZsKzf1ZhSzfC; Tue, 6 May 2025 14:10:22 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1746540622; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=keaYQEt/6ntwLlauZc0w11IbPDTHtQsqNxvI+IVMe4Y=; b=JfHqAEv85ouhod82NL2rPOt/5GA+qvSktAZ4XVGRRSaRPLgAsHTQt05120OAJxhc46zvlp rTpAbSDWm2bgBJAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1746540622; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=keaYQEt/6ntwLlauZc0w11IbPDTHtQsqNxvI+IVMe4Y=; b=iKJ5cViV6ZIReyQA9fnEFpLNr3nxmMrBJNY4Ya1puSVsn3Zso7yav8JEdi1MNA5FG/I547 Q/tAmWwLcGQHnBhCql0a381lt5MSpO3Ku0uPC+tjTPpucpTNd7B7RqCBJPkfcoaNOHjzQs XwAIVq9EWQGBsJZPwd9NHZxpR+4nXiE/DFTB2tYjzNGrl6tFnld1jZHc/vc0gIGZ7OgNhH 8hYZyBW+xXQjWgiwTLu4PX0RSkJeBuvGvlhV7jk/70/o9YEg0BL44ZoCPUnOdssSP2Sqtf n3iS/HGe6rGNB15cYS6j7bXMMZmCqD11UzLoru35p3MMlobr/x7Zabbhra8/NQ== From: Adolf Belka To: development@lists.ipfire.org Cc: Adolf Belka Subject: [PATCH 3/5] chpasswd.cgi: Make swroot refs the same as for other cgi files Date: Tue, 6 May 2025 16:10:11 +0200 Message-ID: <20250506141013.15292-3-adolf.belka@ipfire.org> In-Reply-To: <20250506141013.15292-1-adolf.belka@ipfire.org> References: <20250506141013.15292-1-adolf.belka@ipfire.org> Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: MIME-Version: 1.0 - 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 --- html/cgi-bin/chpasswd.cgi | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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;