X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=blobdiff_plain;f=html%2Fcgi-bin%2Fsamba.cgi;h=b8e57317767e333082e390d1bdf86d0691524c5d;hp=8426e98d223dfb053002b9a9c0cf7d10674b2329;hb=a195328750779741d95b093e8322eb09c27d2871;hpb=115340d291bf0f0fc3c64fca893d863867f268c4
diff --git a/html/cgi-bin/samba.cgi b/html/cgi-bin/samba.cgi
index 8426e98d22..b8e5731776 100644
--- a/html/cgi-bin/samba.cgi
+++ b/html/cgi-bin/samba.cgi
@@ -1,15 +1,28 @@
#!/usr/bin/perl
-#
-# IPFire CGIs
-#
-# This code is distributed under the terms of the GPL
-#
-# (c) The IPFire Team
+###############################################################################
+# #
+# IPFire.org - A linux based firewall #
+# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
+# #
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation, either version 3 of the License, or #
+# (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with this program. If not, see . #
+# #
+###############################################################################
use strict;
# enable only the following on debugging purpose
-use warnings;
-use CGI::Carp 'fatalsToBrowser';
+#use warnings;
+#use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";
@@ -20,6 +33,8 @@ my %cgisettings = ();
my %checked = ();
my %netsettings = ();
my %ovpnsettings = ();
+my %color = ();
+my %mainsettings = ();
my $message = "";
my $errormessage = "";
@@ -42,6 +57,12 @@ 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 ##########################################
@@ -56,7 +77,7 @@ my %servicenames = ('SMB Daemon' => 'smbd','NetBIOS Nameserver' => 'nmbd');
$sambasettings{'WORKGRP'} = 'homeip.net';
$sambasettings{'NETBIOSNAME'} = 'IPFire';
-$sambasettings{'SRVSTRING'} = 'Samba running on IPFire 2.0';
+$sambasettings{'SRVSTRING'} = 'Samba running on IPFire 2.5';
$sambasettings{'INTERFACES'} = '';
$sambasettings{'SECURITY'} = 'share';
$sambasettings{'OSLEVEL'} = '33';
@@ -67,11 +88,17 @@ $sambasettings{'VPN'} = 'off';
$sambasettings{'WINSSRV'} = '';
$sambasettings{'WINSSUPPORT'} = 'on';
$sambasettings{'REMOTEANNOUNCE'} = '';
+$sambasettings{'REMOTESYNC'} = '';
$sambasettings{'PASSWORDSYNC'} = 'off';
$sambasettings{'OTHERINTERFACES'} = '127.0.0.1';
$sambasettings{'GUESTACCOUNT'} = 'samba';
$sambasettings{'MAPTOGUEST'} = 'Never';
$sambasettings{'LOGLEVEL'} = '3 passdb:5 auth:5 winbind:2';
+$sambasettings{'SYSLOGLEVEL'} = '1';
+$sambasettings{'SYSLOGONLY'} = 'on';
+$sambasettings{'DOSCHARSET'} = 'CP850';
+$sambasettings{'UNIXCHARSET'} = 'UTF8';
+$sambasettings{'DISPLAYCHARSET'} = 'CP850';
$sambasettings{'SOCKETOPTIONS'} = 'TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 SO_KEEPALIVE';
### Values that have to be initialized
$sambasettings{'ACTION'} = '';
@@ -94,7 +121,7 @@ my $PDCOPTIONS = `cat ${General::swroot}/samba/pdc`;
&General::readhash("${General::swroot}/samba/settings", \%sambasettings);
&Header::getcgihash(\%sambasettings);
-sub refreshpage{&Header::openbox( 'Waiting', 1, "" );}
+sub refreshpage{&Header::openbox( 'Waiting', 1, "" );print "