From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 20/54] samba: Remove printer management Date: Tue, 13 Oct 2020 16:07:38 +0000 Message-ID: <20201013160812.27754-20-michael.tremer@ipfire.org> In-Reply-To: <20201013160812.27754-1-michael.tremer@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8208213784054571355==" List-Id: --===============8208213784054571355== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Signed-off-by: Michael Tremer --- config/backup/includes/samba | 1 - config/rootfiles/packages/aarch64/samba | 1 - config/rootfiles/packages/armv5tel/samba | 1 - config/rootfiles/packages/i586/samba | 1 - config/rootfiles/packages/x86_64/samba | 1 - html/cgi-bin/samba.cgi | 119 ----------------------- 6 files changed, 124 deletions(-) diff --git a/config/backup/includes/samba b/config/backup/includes/samba index 67823bd19..1d2166ca5 100644 --- a/config/backup/includes/samba +++ b/config/backup/includes/samba @@ -1,6 +1,5 @@ /var/ipfire/samba/global /var/ipfire/samba/pdc -/var/ipfire/samba/printer /var/ipfire/samba/private/ /var/ipfire/samba/settings /var/ipfire/samba/shares diff --git a/config/rootfiles/packages/aarch64/samba b/config/rootfiles/packa= ges/aarch64/samba index 61e29fe8c..ad5ffb204 100644 --- a/config/rootfiles/packages/aarch64/samba +++ b/config/rootfiles/packages/aarch64/samba @@ -795,7 +795,6 @@ var/ipfire/backup/addons/includes/samba #var/ipfire/samba var/ipfire/samba/global var/ipfire/samba/pdc -var/ipfire/samba/printer #var/ipfire/samba/private var/ipfire/samba/private/secrets.tdb var/ipfire/samba/private/smbpasswd diff --git a/config/rootfiles/packages/armv5tel/samba b/config/rootfiles/pack= ages/armv5tel/samba index 16e9dab11..9d445db8f 100644 --- a/config/rootfiles/packages/armv5tel/samba +++ b/config/rootfiles/packages/armv5tel/samba @@ -795,7 +795,6 @@ var/ipfire/backup/addons/includes/samba #var/ipfire/samba var/ipfire/samba/global var/ipfire/samba/pdc -var/ipfire/samba/printer #var/ipfire/samba/private var/ipfire/samba/private/secrets.tdb var/ipfire/samba/private/smbpasswd diff --git a/config/rootfiles/packages/i586/samba b/config/rootfiles/packages= /i586/samba index dea9aa023..0888fc6ed 100644 --- a/config/rootfiles/packages/i586/samba +++ b/config/rootfiles/packages/i586/samba @@ -795,7 +795,6 @@ var/ipfire/backup/addons/includes/samba #var/ipfire/samba var/ipfire/samba/global var/ipfire/samba/pdc -var/ipfire/samba/printer #var/ipfire/samba/private var/ipfire/samba/private/secrets.tdb var/ipfire/samba/private/smbpasswd diff --git a/config/rootfiles/packages/x86_64/samba b/config/rootfiles/packag= es/x86_64/samba index 31328a3a0..54afad4d2 100644 --- a/config/rootfiles/packages/x86_64/samba +++ b/config/rootfiles/packages/x86_64/samba @@ -795,7 +795,6 @@ var/ipfire/backup/addons/includes/samba #var/ipfire/samba var/ipfire/samba/global var/ipfire/samba/pdc -var/ipfire/samba/printer #var/ipfire/samba/private var/ipfire/samba/private/secrets.tdb var/ipfire/samba/private/smbpasswd diff --git a/html/cgi-bin/samba.cgi b/html/cgi-bin/samba.cgi index cd0cc8ab8..a9478a139 100644 --- a/html/cgi-bin/samba.cgi +++ b/html/cgi-bin/samba.cgi @@ -48,8 +48,6 @@ my $userfile =3D "${General::swroot}/samba/private/smbpassw= d"; my %selected=3D () ; =20 my $defaultoption=3D "[Share]\npath =3D /var/ipfire/samba/share1\ncomment = =3D Share - Public Access\nbrowseable =3D yes\nwriteable =3D yes\ncreate mask= =3D 0777\ndirectory mask =3D 0777\npublic =3D yes\nforce user =3D samba"; -my $defaultprinter=3D "[Printer]\ncomment =3D Printer public\npath =3D /var/= spool/cups\nprinting =3D sysvn\nprintcap =3D lpstat\npublic =3D yes\nwritable= =3D no\nprintable =3D yes"; -my %printer =3D (); my %shares =3D (); =20 &General::readhash("${General::swroot}/ethernet/settings", \%netsettings); @@ -873,120 +871,6 @@ if ($sambasettings{'ACTION'} eq 'smbsharechange') =20 &Header::closebox(); =20 -############################################################################= ################################################ -################################################ Verwalten von Druckern ####= ################################################ - -my %printer =3D config("${General::swroot}/samba/printer"); - -&Header::openbox('100%', 'center', $Lang::tr{'printer'}); - -my @Printers =3D keys(%printer); -print < -
- - -END -; -foreach my $printerentry (sort @Printers) - { - chomp $printerentry; - print < - - -END -; - } -print < -
-
$Lang:= :tr{'manage printers'} -
$Lang::tr{'printername'}$Lang::tr{'options'}
$printerentry
- - - -
- - - -
- - - -
- - -
- - -
-END -; - -if ($sambasettings{'ACTION'} eq 'printeradd' || $sambasettings{'ACTION'} eq = 'printercaption' ) - { - print < - - - - -
$Lang= ::tr{'add printer'}
$Lang::tr{'show share options'} -
-
- - -
-
- -END -; - } -=09 -if ($sambasettings{'ACTION'} eq 'printerchange' || $sambasettings{'ACTION'} = eq 'printercaption2' ) - { - my $printeroption =3D $printer{$sambasettings{'NAME'}}; - print < - - - - -
$Lang= ::tr{'edit printer'}
-
- - -
- -
-END -; - } - -if ($sambasettings{'ACTION'} eq 'smbprinteradd') - { - $printer{'xvx'}=3D "$sambasettings{'PRINTEROPTION'}"; - save("printer"); - my %printer =3D config("${General::swroot}/samba/printer"); - } - -if ($sambasettings{'ACTION'} eq 'smbprinterdel') - { - delete $printer{$sambasettings{'NAME'}}; - save("printer"); - my %printer =3D config("${General::swroot}/samba/printer"); - } - -if ($sambasettings{'ACTION'} eq 'smbprinterchange') - { - $printer{$sambasettings{'NAME'}} =3D $sambasettings{'PRINTEROPTION'}; - save("printer"); - my %printer =3D config("${General::swroot}/samba/printer"); - } - -&Header::closebox(); - ############################################################################= ################################################ ############################################### Anzeige des Sambastatus ####= ################################################ =20 @@ -1049,9 +933,6 @@ my $smb =3D shift; open (FILE, ">${General::swroot}/samba/$smb") or die "Can't $smb settings $!= "; flock (FILE, 2); =20 -if ( $smb eq 'printer') - {while (my ($name, $option) =3D each %printer){chomp $option;$option =3D~ s= /\r\n/\n/gi;$option =3D~ s/^\n//gi;$option =3D~ s/^\r//gi;$option =3D~ s/^.\n= //gi;$option =3D~ s/^.\r//gi;print FILE "$option\n";}} - if ( $smb eq 'shares') {while (my ($name, $option) =3D each %shares){chomp $option;$option =3D~ s/= \r\n/\n/gi;$option =3D~ s/^\n//gi;$option =3D~ s/^\r//gi;$option =3D~ s/^.\n/= /gi;$option =3D~ s/^.\r//gi;print FILE "$option\n";} } =20 --=20 2.20.1 --===============8208213784054571355==--