From patchwork Tue Oct 13 16:07:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 3549 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 4C9gTV3NdJz3x1S for ; Tue, 13 Oct 2020 16:09:02 +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 4C9gSs4sbRz1Kd; Tue, 13 Oct 2020 16:08:29 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4C9gSp30bCz305B; Tue, 13 Oct 2020 16:08:26 +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 4C9gSn00wjz304y for ; Tue, 13 Oct 2020 16:08:25 +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 4C9gSl4HLPz1H9; Tue, 13 Oct 2020 16:08:23 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1602605303; 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=6RtQIkoasgbCPFEAXHS2hEkF1v036Rs7TDrZ9RMtnwA=; b=uip8UBDW+WJji/gNzB3o3mYz15al4tAzquCVjKfX7OWPrXdwL5DDoqxf0ELH7UH0OLeny0 mQVZkIruMU0VLoDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1602605303; 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=6RtQIkoasgbCPFEAXHS2hEkF1v036Rs7TDrZ9RMtnwA=; b=PW5NjfixBdnV2q3GmnunPLgP8559DPayU3NPj4nTOLCe/kZmjLsI0phZzmy85DrtKZhJ3q gc5OB1ANOYp/tlDh2c0USOqu4MD4FCookEbDVpb7cpSaF18UyJLfraI/dn259U9vXym2dl ozJmAtAmu/WaLEZ44Skw5eUOVcKHcyzoUXhUElFU7PHISLQMfyZsegLaDUmQsdBSIdIQ5K GKs+jROIruuizt3VYJsHmge4qxFTUwvVUzwfEFTXdQYP4Ak2rrvCFgkdCAvZTMsbkfL7o9 YwEWELWZuL2sq3RTz8EOY8ioipdu52BK6L+U9o90vn9cNf6ewgrAvh7UYbxHBQ== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 24/54] samba: Drop support for being PDC for Windows NT domains Date: Tue, 13 Oct 2020 16:07:42 +0000 Message-Id: <20201013160812.27754-24-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" This is outdated, and nobody uses it Signed-off-by: Michael Tremer --- html/cgi-bin/samba.cgi | 119 +++++------------------------------------ 1 file changed, 13 insertions(+), 106 deletions(-) diff --git a/html/cgi-bin/samba.cgi b/html/cgi-bin/samba.cgi index 902ae6eac..2c2c506e5 100644 --- a/html/cgi-bin/samba.cgi +++ b/html/cgi-bin/samba.cgi @@ -93,7 +93,6 @@ my $LOGLINES = '50'; ################################################## Samba PDC Variablen ##################################################### $sambasettings{'LOCALMASTER'} = 'off'; -$sambasettings{'DOMAINMASTER'} = 'off'; $sambasettings{'PREFERREDMASTER'} = 'off'; my $PDCOPTIONS = `cat ${General::swroot}/samba/pdc`; @@ -152,7 +151,6 @@ delete $sambasettings{'__CGI__'};delete $sambasettings{'x'};delete $sambasetting if ($sambasettings{'PASSWORDSYNC'} eq 'on'){ $sambasettings{'PASSWORDSYNC'} = "true";} else { $sambasettings{'PASSWORDSYNC'} = "false";} if ($sambasettings{'LOCALMASTER'} eq 'on'){ $sambasettings{'LOCALMASTER'} = "true";} else { $sambasettings{'LOCALMASTER'} = "false";} -if ($sambasettings{'DOMAINMASTER'} eq 'on'){ $sambasettings{'DOMAINMASTER'} = "true";} else { $sambasettings{'DOMAINMASTER'} = "false";} if ($sambasettings{'PREFERREDMASTER'} eq 'on'){ $sambasettings{'PREFERREDMASTER'} = "true";} else { $sambasettings{'PREFERREDMASTER'} = "false";} if ($sambasettings{'WIDELINKS'} eq 'on'){ $sambasettings{'WIDELINKS'} = "yes";} else { $sambasettings{'WIDELINKS'} = "no";} if ($sambasettings{'UNIXEXTENSION'} eq 'on'){ $sambasettings{'UNIXEXTENSION'} = "yes";} else { $sambasettings{'UNIXEXTENSION'} = "no";} @@ -197,7 +195,6 @@ winbind use default domain = yes logging = syslog preferred master = $sambasettings{'PREFERREDMASTER'} -domain master = $sambasettings{'DOMAINMASTER'} local master = $sambasettings{'LOCALMASTER'} END ; @@ -215,27 +212,9 @@ printable = yes END close FILE; -if ($sambasettings{'SECURITY'} eq 'user' && $sambasettings{'DOMAINMASTER'} eq 'true' ) - { - open (FILE, ">${General::swroot}/samba/pdc") or die "Can't save the pdc settings: $!"; - flock (FILE, 2); - chomp $sambasettings{'PDCOPTIONS'}; - $sambasettings{'PDCOPTIONS'} =~ s/\r\n/\n/gi; - $sambasettings{'PDCOPTIONS'} =~ s/^\n//gi; - $sambasettings{'PDCOPTIONS'} =~ s/^\r//gi; - $sambasettings{'PDCOPTIONS'} =~ s/^.\n//gi; - $sambasettings{'PDCOPTIONS'} =~ s/^.\r//gi; - print FILE < $Lang::tr{'basic options'} $Lang::tr{'workgroup'} -print <
Wide linkson / off @@ -346,7 +321,6 @@ print <$Lang::tr{'security options'} $Lang::tr{'security'} @@ -377,25 +351,12 @@ if ($sambasettings{'SECURITY'} eq 'user') print <$Lang::tr{'local master'}on / off -$Lang::tr{'domain master'}on / - off $Lang::tr{'prefered master'}on / off END ; } -if ($sambasettings{'SECURITY'} eq 'user' && $sambasettings{'DOMAINMASTER'} eq 'on') - { - print <
- $Lang::tr{'pdc options'} -
- -END -; - } - print <
@@ -430,14 +391,7 @@ END if ($sambasettings{'SECURITY'} eq 'user') { - if ($sambasettings{'DOMAINMASTER'} eq 'off') - { - &Header::openbox('100%', 'center', $Lang::tr{'accounting user nonpdc'}); - } - else - { - &Header::openbox('100%', 'center', $Lang::tr{'accounting user pdc'}); - } + &Header::openbox('100%', 'center', $Lang::tr{'user management'}); print <
@@ -448,15 +402,7 @@ if ($sambasettings{'SECURITY'} eq 'user') END ; - if ($sambasettings{'DOMAINMASTER'} eq 'off') - { - print ""; - } - else - { - print "$Lang::tr{'type'}"; - } - + print ""; print "$Lang::tr{'status'}$Lang::tr{'options'}"; system('/usr/local/bin/sambactrl readsmbpasswd'); open(FILE, "<${General::swroot}/samba/private/smbpasswd") or die "Can't read user file: $!"; @@ -480,21 +426,7 @@ END print "$Lang::tr{'set'}"; } - if ($sambasettings{'DOMAINMASTER'} eq 'off') - { - print ""; - } - else - { - if ($userline[0] =~ /\$/) - { - print "$Lang::tr{'pc'}"; - } - else - { - print "$Lang::tr{'user'}"; - } - } + print ""; if ($userline[4] =~ /D/) { @@ -537,28 +469,14 @@ END ; } - if ($sambasettings{'DOMAINMASTER'} eq 'on' && $userline[0] =~ /\$/) - { - print <
- - - -
-END -; - } - else - { - print <
- - - -
+ print <
+ + + +
END ; - } $lines++; } print <
- -
-END -; - } print <
@@ -930,9 +839,7 @@ if ( $smb eq 'shares') close FILE; -if ( $sambasettings{'SECURITY'} eq 'user' && $sambasettings{'DOMAINMASTER'} eq 'true' ){system("/usr/local/bin/sambactrl smbsafeconfpdc");} - else{system("/usr/local/bin/sambactrl smbsafeconf");} - +system("/usr/local/bin/sambactrl smbsafeconf"); system("/usr/local/bin/sambactrl smbreload"); refreshpage(); }