From patchwork Tue Oct 13 16:08:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 3571 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 4C9gW76qftz3x3M for ; Tue, 13 Oct 2020 16:10:27 +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 4C9gT15ht3z1V6; Tue, 13 Oct 2020 16:08:37 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4C9gSz4wJ7z304V; Tue, 13 Oct 2020 16:08:35 +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 4C9gSv66wWz305W for ; Tue, 13 Oct 2020 16:08:31 +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 4C9gSs2Vp7zwn; Tue, 13 Oct 2020 16:08:29 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1602605309; 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=jBp6eva8u1OK+R3EYelK9zSXqWKJUHxJmML6mZ7s1W4=; b=/TtSA4Ior3ie8tgjn9w2IZZHhrLh+FHyqAFPCyzwAlEvXRbJYDauXLpPI9aHttZEZm1Mb4 U+w+Ipx2UpmV0gDg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1602605309; 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=jBp6eva8u1OK+R3EYelK9zSXqWKJUHxJmML6mZ7s1W4=; b=F/WKExZR2DrfI8qPY5R4u5E+m+wRljiPyZqaPruEVfw1DRgixHiZj8FtN7f3WG2sg99THN 7OdfbupckDTJlf33bxymbYVGavBplm6XT1nPw3LiU90y6xy1hWrEONN1ZwEIj2RehN6rbP LqaJHYvrIN+8pfFtHO4HcqhA7q9y/UTABawCDIdQLJCBwhEXvGNdL+RQlLeTj4+PBwHoTj CCd+IXHuIgWo6QNXUv5ZOOlgD0EP/4RoGDLHbzZF7J0WlTf9YS0wHdKimvsd/3Dotz3usj d5XlI5Xq+HThWXDuoUU8ub2PEHZXBzdgo5xbyD7nBLVQu0JiX90keDsmuCBW9w== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 43/54] samba: Drop choice to enable/disable wide links/UNIX extensions Date: Tue, 13 Oct 2020 16:08:01 +0000 Message-Id: <20201013160812.27754-43-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 | 38 +++----------------------------------- 1 file changed, 3 insertions(+), 35 deletions(-) diff --git a/html/cgi-bin/samba.cgi b/html/cgi-bin/samba.cgi index d9c5f3f29..f46ab7ee3 100644 --- a/html/cgi-bin/samba.cgi +++ b/html/cgi-bin/samba.cgi @@ -65,8 +65,6 @@ $sambasettings{'REMOTEANNOUNCE'} = ''; $sambasettings{'REMOTESYNC'} = ''; $sambasettings{'GUESTACCOUNT'} = 'samba'; $sambasettings{'MAPTOGUEST'} = 'Bad User'; -$sambasettings{'WIDELINKS'} = 'on'; -$sambasettings{'UNIXEXTENSION'} = 'off'; $sambasettings{'ENCRYPTION'} = 'optional'; ### Values that have to be initialized $sambasettings{'ACTION'} = ''; @@ -77,9 +75,6 @@ my $LOGLINES = '50'; &General::readhash("${General::swroot}/samba/settings", \%sambasettings); &Header::getcgihash(\%sambasettings); -if (($sambasettings{'WIDELINKS'} eq 'on') & ($sambasettings{'UNIXEXTENSION'} eq 'on')) - {$errormessage = "$errormessage
Don't enable 'Wide links' and 'Unix extension' at the same time"; } - &Header::openpage('Samba', 1, ''); &Header::openbigbox('100%', 'left', '', $errormessage); @@ -115,9 +110,6 @@ if ($sambasettings{'ACTION'} eq $Lang::tr{'save'}) delete $sambasettings{'__CGI__'};delete $sambasettings{'x'};delete $sambasettings{'y'}; &General::writehash("${General::swroot}/samba/settings", \%sambasettings); -if ($sambasettings{'WIDELINKS'} eq 'on'){ $sambasettings{'WIDELINKS'} = "yes";} else { $sambasettings{'WIDELINKS'} = "no";} -if ($sambasettings{'UNIXEXTENSION'} eq 'on'){ $sambasettings{'UNIXEXTENSION'} = "yes";} else { $sambasettings{'UNIXEXTENSION'} = "no";} - ############################################################################################################################ ############################################# Schreiben der Samba globals ################################################## @@ -134,9 +126,6 @@ workgroup = $sambasettings{'WORKGRP'} realm = $mainsettings{'DOMAINNAME'} passdb backend = smbpasswd -wide links = $sambasettings{'WIDELINKS'} -unix extensions = $sambasettings{'UNIXEXTENSION'} - map to guest = $sambasettings{'MAPTOGUEST'} security = $sambasettings{'SECURITY'} @@ -159,6 +148,9 @@ logging = syslog # Enable support for Apple vfs objects = catia fruit streams_xattr +# Enable following symlinks +wide links = yes + END ; @@ -201,12 +193,6 @@ if ($message) { ############################################################################################################################ ########################################## Aktivieren von Checkboxen und Dropdowns ######################################### -$checked{'WIDELINKS'}{'off'} = ''; -$checked{'WIDELINKS'}{'on'} = ''; -$checked{'WIDELINKS'}{$sambasettings{'WIDELINKS'}} = "checked='checked'"; -$checked{'UNIXEXTENSION'}{'off'} = ''; -$checked{'UNIXEXTENSION'}{'on'} = ''; -$checked{'UNIXEXTENSION'}{$sambasettings{'UNIXEXTENSION'}} = "checked='checked'"; $selected{'ENCRYPTION'}{'optional'} = ''; $selected{'ENCRYPTION'}{'desired'} = ''; $selected{'ENCRYPTION'}{'required'} = ''; @@ -292,24 +278,6 @@ print <
- - Wide links - - on / - off - - - - Unix extension - - on / - off - - - -
- - $Lang::tr{'security options'}