From patchwork Tue Oct 13 16:07:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 3555 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 (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4C9gTk0kP5z3x1S for ; Tue, 13 Oct 2020 16:09:14 +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 ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4C9gSw4gKtz1Jk; Tue, 13 Oct 2020 16:08:32 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4C9gSt0CCHz304l; Tue, 13 Oct 2020 16:08:30 +0000 (UTC) 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 (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4C9gSq5KMHz305j for ; Tue, 13 Oct 2020 16:08:27 +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 ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 4C9gSn5xcKz1Gj; Tue, 13 Oct 2020 16:08:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1602605305; 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=KhRBMAadqXDJ7zQm1wYqfcUUs6h3VXCG4BFJd4SLYNg=; b=QqDoC8QldoRMFnVY6xA2LYoUwZPPH4TAwyHNvaC0hIRE9T+N4q3KhyQgQt0ZRvPiBZP2l7 ZDRE7jQWGfKIgm3qLQcmGAh/rVxnXFIdI26JLoHO3cEXoa4DQFvXZtKP44QKg5DUCLQS20 CQ9v3WVQTC702pm77QctrX5iyLm4XIxk2VX+MZpwQKpPcAKepvamA50STR/XMabXk7foI3 +THVPM5WshQhBcazlvCg9HS9QF7Eh22/9L9otWoDTZ8dOpukfh7HiT2oOEHFca1zuQQQdR RZeP2ZNADlAuQRVgWS98XXcbmJDl0EAq1iNZWHJR+cNspbNvJiL1HdfsBnybpQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1602605305; 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=KhRBMAadqXDJ7zQm1wYqfcUUs6h3VXCG4BFJd4SLYNg=; b=cRIF9TqfyEylRE2oo0A8GPLBJfu428bbqnH4kIBHeBxOd7J6wBn0yka14GYbcIdD5FGof5 WYslx4LvUldv/HBA== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 29/54] samba: Remove move unused network variables Date: Tue, 13 Oct 2020 16:07:47 +0000 Message-Id: <20201013160812.27754-29-michael.tremer@ipfire.org> In-Reply-To: <20201013160812.27754-1-michael.tremer@ipfire.org> References: <20201013160812.27754-1-michael.tremer@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Tremer Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Signed-off-by: Michael Tremer --- html/cgi-bin/samba.cgi | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/html/cgi-bin/samba.cgi b/html/cgi-bin/samba.cgi index 536d7f1d6..5d0d95b38 100644 --- a/html/cgi-bin/samba.cgi +++ b/html/cgi-bin/samba.cgi @@ -32,7 +32,6 @@ my %sambasettings = (); my %cgisettings = (); my %checked = (); my %netsettings = (); -my %ovpnsettings = (); my %color = (); my %mainsettings = (); my $message = ""; @@ -51,14 +50,9 @@ my $defaultoption= "[Share]\npath = /var/ipfire/samba/share1\ncomment = Share - my %shares = (); &General::readhash("${General::swroot}/ethernet/settings", \%netsettings); -&General::readhash("${General::swroot}/ovpn/settings", \%ovpnsettings); &General::readhash("${General::swroot}/main/settings", \%mainsettings); &General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color); -my @ovpnnetwork = split(/\//,$ovpnsettings{'DOVPN_SUBNET'}); -my @ovpnip = split(/\./,$ovpnnetwork[0]); -$ovpnip[3]=$ovpnip[3]+1; - ############################################################################################################################ ############################################# Samba Dienste fr Statusberprfung ########################################## @@ -72,14 +66,9 @@ my %servicenames = ('SMB Daemon' => 'smbd', 'NetBIOS Nameserver' => 'nmbd', 'Win $sambasettings{'WORKGRP'} = 'homeip.net'; $sambasettings{'INTERFACES'} = ''; $sambasettings{'SECURITY'} = 'user'; -$sambasettings{'GREEN'} = 'on'; -$sambasettings{'BLUE'} = 'off'; -$sambasettings{'ORANGE'} = 'off'; -$sambasettings{'VPN'} = 'off'; $sambasettings{'REMOTEANNOUNCE'} = ''; $sambasettings{'REMOTESYNC'} = ''; $sambasettings{'PASSWORDSYNC'} = 'off'; -$sambasettings{'OTHERINTERFACES'} = '127.0.0.1'; $sambasettings{'GUESTACCOUNT'} = 'samba'; $sambasettings{'MAPTOGUEST'} = 'Bad User'; $sambasettings{'WIDELINKS'} = 'on'; @@ -128,13 +117,6 @@ if ($sambasettings{'ACTION'} eq 'userdelete'){system("/usr/local/bin/sambactrl s if ($sambasettings{'ACTION'} eq $Lang::tr{'save'}) { -$sambasettings{'INTERFACES'} = ''; -if ($sambasettings{'GREEN'} eq 'on'){ $sambasettings{'INTERFACES'} .= " $netsettings{'GREEN_DEV'}";} -if ($sambasettings{'BLUE'} eq 'on'){ $sambasettings{'INTERFACES'} .= " $netsettings{'BLUE_DEV'}";} -if ($sambasettings{'ORANGE'} eq 'on'){ $sambasettings{'INTERFACES'} .= " $netsettings{'ORANGE_DEV'}";} -if ($sambasettings{'VPN'} eq 'on'){$sambasettings{'INTERFACES'} .= " ";} -if ($sambasettings{'OTHERINTERFACES'} ne ''){ $sambasettings{'INTERFACES'} .= " $sambasettings{'OTHERINTERFACES'}";} - ############################################################################################################################ ##################################### Schreiben settings und bersetzen fr smb.conf ####################################### @@ -235,18 +217,6 @@ $checked{'WIDELINKS'}{$sambasettings{'WIDELINKS'}} = "checked='checked'"; $checked{'UNIXEXTENSION'}{'off'} = ''; $checked{'UNIXEXTENSION'}{'on'} = ''; $checked{'UNIXEXTENSION'}{$sambasettings{'UNIXEXTENSION'}} = "checked='checked'"; -$checked{'GREEN'}{'off'} = ''; -$checked{'GREEN'}{'on'} = ''; -$checked{'GREEN'}{$sambasettings{'GREEN'}} = "checked='checked'"; -$checked{'BLUE'}{'off'} = ''; -$checked{'BLUE'}{'on'} = ''; -$checked{'BLUE'}{$sambasettings{'BLUE'}} = "checked='checked'"; -$checked{'ORANGE'}{'off'} = ''; -$checked{'ORANGE'}{'on'} = ''; -$checked{'ORANGE'}{$sambasettings{'ORANGE'}} = "checked='checked'"; -$checked{'VPN'}{'off'} = ''; -$checked{'VPN'}{'on'} = ''; -$checked{'VPN'}{$sambasettings{'VPN'}} = "checked='checked'"; $selected{'ENCRYPTION'}{'optional'} = ''; $selected{'ENCRYPTION'}{'desired'} = ''; $selected{'ENCRYPTION'}{'required'} = '';