diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/cron/cron.tmp | 44 | ||||
-rw-r--r-- | config/cron/cron.xml | 4 | ||||
-rw-r--r-- | config/cron/cron_edit.tmp | 61 | ||||
-rwxr-xr-x | config/dansguardian/dansguardian.inc | 28 | ||||
-rwxr-xr-x | config/dansguardian/dansguardian_groups.xml | 3 | ||||
-rw-r--r-- | config/dansguardian/dansguardianfx.conf.template | 2 | ||||
-rw-r--r-- | config/iperf.xml | 2 | ||||
-rw-r--r-- | config/iperfserver.xml | 2 |
8 files changed, 82 insertions, 64 deletions
diff --git a/config/cron/cron.tmp b/config/cron/cron.tmp index 1834ba62..b9666e01 100644 --- a/config/cron/cron.tmp +++ b/config/cron/cron.tmp @@ -44,29 +44,29 @@ if ($_GET['act'] == "del") { } } +$pgtitle = array(gettext("Cron"),gettext("Settings")); include("head.inc"); ?> - <body link="#0000CC" vlink="#0000CC" alink="#0000CC"> <?php include("fbegin.inc"); ?> -<p class="pgtitle">Cron: Settings</p> <div id="mainlevel"> -<table width="100%" border="0" cellpadding="0" cellspacing="0"> +<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="tabs"> <tr><td class="tabnavtbl"> <?php $tab_array = array(); $tab_array[] = array(gettext("Settings"), true, "/packages/cron/cron.php"); + $tab_array[] = array(gettext("Edit"), false, "/packages/cron/cron_edit.php"); display_top_tabs($tab_array); ?> </td></tr> </table> -<table width="100%" border="0" cellpadding="0" cellspacing="0"> +<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="content"> <tr> <td class="tabcont" > @@ -85,7 +85,7 @@ if ($config_change == 1) { //endif; ?> - <table width="100%" border="0" cellpadding="6" cellspacing="0"> + <table width="100%" border="0" cellpadding="6" cellspacing="0" summary="title"> <tr> <td><p><!--<span class="vexpl"><span class="red"><strong>Cron<br></strong></span>--> Cron controls the scheduling of commands. @@ -96,7 +96,7 @@ if ($config_change == 1) { </table> <br /> - <table width="100%" border="0" cellpadding="0" cellspacing="0"> + <table width="100%" border="0" cellpadding="0" cellspacing="0" summary="heading"> <tr> <td width="5%" class="listhdrr">minute</td> <td width="5%" class="listhdrr">hour</td> @@ -107,10 +107,10 @@ if ($config_change == 1) { <td width="60%" class="listhdr">command</td> <td width="10%" class="list"> - <table border="0" cellspacing="0" cellpadding="1"> + <table border="0" cellspacing="0" cellpadding="1" summary="icons"> <tr> <td width="17"></td> - <td valign="middle"><a href="cron_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0"></a></td> + <td valign="middle"><a href="cron_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" alt="edit" /></a></td> </tr> </table> @@ -149,11 +149,11 @@ if ($config_change == 1) { <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';"> <?=$ent['command'];?> </td> - <td valign="middle" nowrap class="list"> - <table border="0" cellspacing="0" cellpadding="1"> + <td valign="middle" style="white-space:nowrap" class="list"> + <table border="0" cellspacing="0" cellpadding="1" summary="edit delete"> <tr> - <td valign="middle"><a href="cron_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a></td> - <td><a href="cron_edit.php?type=php&act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this?')"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td> + <td valign="middle"><a href="cron_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" alt="edit" /></a></td> + <td><a href="cron_edit.php?type=php&act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this?')"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" alt="delete" /></a></td> </tr> </table> </td> @@ -168,10 +168,10 @@ if ($config_change == 1) { <tr> <td class="list" colspan="7"></td> <td class="list"> - <table border="0" cellspacing="0" cellpadding="1"> + <table border="0" cellspacing="0" cellpadding="1" summary="add"> <tr> <td width="17"></td> - <td valign="middle"><a href="cron_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0"></a></td> + <td valign="middle"><a href="cron_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" alt="add" /></a></td> </tr> </table> </td> @@ -187,14 +187,14 @@ if ($config_change == 1) { </form> -<br> -<br> -<br> -<br> -<br> -<br> -<br> -<br> +<br /> +<br /> +<br /> +<br /> +<br /> +<br /> +<br /> +<br /> </td> </tr> diff --git a/config/cron/cron.xml b/config/cron/cron.xml index 710af132..3084b0c7 100644 --- a/config/cron/cron.xml +++ b/config/cron/cron.xml @@ -41,7 +41,7 @@ <requirements>Describe your package requirements here</requirements> <faq>Currently there are no FAQ items provided.</faq> <name>Cron Settings</name> - <version>0.2</version> + <version>0.2.1</version> <title>Settings</title> <include_file>/usr/local/pkg/cron.inc</include_file> <menu> @@ -118,4 +118,4 @@ <custom_php_deinstall_command> cron_deinstall_command(); </custom_php_deinstall_command> -</packagegui>
\ No newline at end of file +</packagegui> diff --git a/config/cron/cron_edit.tmp b/config/cron/cron_edit.tmp index 71367d24..67148af0 100644 --- a/config/cron/cron_edit.tmp +++ b/config/cron/cron_edit.tmp @@ -96,44 +96,48 @@ if ($_POST) { } } +$pgtitle = array(gettext("Cron"),gettext("Edit")); include("head.inc"); ?> -<script type="text/javascript" language="JavaScript"> +<body link="#0000CC" vlink="#0000CC" alink="#0000CC"> +<script type="text/javascript"> +//<![CDATA[ function show_advanced_config() { document.getElementById("showadvancedbox").innerHTML=''; aodiv = document.getElementById('showadvanced'); aodiv.style.display = "block"; +//]]> </script> -<body link="#0000CC" vlink="#0000CC" alink="#0000CC"> <?php include("fbegin.inc"); ?> -<p class="pgtitle">Cron: Edit</p> + <?php if ($input_errors) print_input_errors($input_errors); ?> <div id="mainlevel"> -<table width="100%" border="0" cellpadding="0" cellspacing="0"> +<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="mainlevel"> <tr><td class="tabnavtbl"> <?php $tab_array = array(); $tab_array[] = array(gettext("Settings"), false, "/packages/cron/cron.php"); + $tab_array[] = array(gettext("Edit"), true, "/packages/cron/cron_edit.php"); display_top_tabs($tab_array); ?> </td></tr> </table> -<table width="100%" border="0" cellpadding="0" cellspacing="0"> +<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="mainarea"> <tr> <td class="tabcont" > <!-- - <table width="100%" border="0" cellpadding="6" cellspacing="0"> + <table width="100%" border="0" cellpadding="6" cellspacing="0" summary="title"> <tr> - <td><p><span class="vexpl"><span class="red"><strong>Cron<br> + <td><p><span class="vexpl"><span class="red"><strong>Cron<br /> </strong></span> </p></td> </tr> @@ -142,7 +146,7 @@ function show_advanced_config() { <br /> <form action="cron_edit.php" method="post" name="iform" id="iform"> - <table width="100%" border="0" cellpadding="6" cellspacing="0"> + <table width="100%" border="0" cellpadding="6" cellspacing="0" summary="form"> @@ -150,49 +154,50 @@ function show_advanced_config() { <tr> <td width="25%" valign="top" class="vncellreq">minute</td> <td width="75%" class="vtable"> - <input name="minute" type="text" class="formfld" id="minute" size="40" value="<?=htmlspecialchars($pconfig['minute']);?>"> + <input name="minute" type="text" class="formfld" id="minute" size="40" value="<?=htmlspecialchars($pconfig['minute']);?>" /> </td> </tr> <tr> <td width="25%" valign="top" class="vncellreq">hour</td> <td width="75%" class="vtable"> - <input name="hour" type="text" class="formfld" id="hour" size="40" value="<?=htmlspecialchars($pconfig['hour']);?>"> + <input name="hour" type="text" class="formfld" id="hour" size="40" value="<?=htmlspecialchars($pconfig['hour']);?>" /> </td> </tr> <tr> <td width="25%" valign="top" class="vncellreq">mday</td> <td width="75%" class="vtable"> - <input name="mday" type="text" class="formfld" id="mday" size="40" value="<?=htmlspecialchars($pconfig['mday']);?>"> + <input name="mday" type="text" class="formfld" id="mday" size="40" value="<?=htmlspecialchars($pconfig['mday']);?>" /> </td> </tr> <tr> <td width="25%" valign="top" class="vncellreq">month</td> <td width="75%" class="vtable"> - <input name="month" type="text" class="formfld" id="month" size="40" value="<?=htmlspecialchars($pconfig['month']);?>"> + <input name="month" type="text" class="formfld" id="month" size="40" value="<?=htmlspecialchars($pconfig['month']);?>" /> </td> </tr> <tr> <td width="25%" valign="top" class="vncellreq">wday</td> <td width="75%" class="vtable"> - <input name="wday" type="text" class="formfld" id="wday" size="40" value="<?=htmlspecialchars($pconfig['wday']);?>"> + <input name="wday" type="text" class="formfld" id="wday" size="40" value="<?=htmlspecialchars($pconfig['wday']);?>" /> </td> </tr> <tr> <td width="25%" valign="top" class="vncellreq">who</td> <td width="75%" class="vtable"> - <input name="who" type="text" class="formfld" id="who" size="40" value="<?=htmlspecialchars($pconfig['who']);?>"> + <input name="who" type="text" class="formfld" id="who" size="40" value="<?=htmlspecialchars($pconfig['who']);?>" /> </td> </tr> <tr> <td width="25%" valign="top" class="vncellreq">command</td> <td width="75%" class="vtable"> - <input name="command" type="text" class="formfld" id="command" size="40" value="<?=htmlspecialchars($pconfig['command']);?>"> + <!-- <input name="command" type="text" class="formfld" id="command" size="40" value="<?=htmlspecialchars($pconfig['command']);?>" /> --> + <textarea rows="3" cols="68" name="command" id="command"><?=htmlspecialchars($pconfig['command']);?></textarea> </td> </tr> <!-- @@ -224,16 +229,16 @@ function show_advanced_config() { echo " <option></option>\n"; switch (htmlspecialchars($pconfig['enabled'])) { case "true": - echo " <option value='true' selected='yes'>true</option>\n"; + echo " <option value='true' selected='selected'>true</option>\n"; echo " <option value='false'>false</option>\n"; break; case "false": echo " <option value='true'>true</option>\n"; - echo " <option value='false' selected='yes'>false</option>\n"; + echo " <option value='false' selected='selected'>false</option>\n"; break; default: - echo " <option value='true' selected='yes'>true</option>\n"; + echo " <option value='true' selected='selected'>true</option>\n"; echo " <option value='false'>false</option>\n"; } echo " </select>\n"; @@ -245,8 +250,8 @@ function show_advanced_config() { <tr> <td width="25%" valign="top" class="vncellreq">Description</td> <td width="75%" class="vtable"> - <input name="description" type="text" class="formfld" id="description" size="40" value="<?=htmlspecialchars($pconfig['description']);?>"> - <br><span class="vexpl">Enter the description here.<br></span> + <input name="description" type="text" class="formfld" id="description" size="40" value="<?=htmlspecialchars($pconfig['description']);?>" /> + <br /><span class="vexpl">Enter the description here.<br /></span> </td> </tr> --> @@ -254,21 +259,21 @@ function show_advanced_config() { <tr> <td valign="top"> </td> <td> - <input name="Submit" type="submit" class="formbtn" value="Save"> <input class="formbtn" type="button" value="Cancel" onclick="history.back()"> + <input name="Submit" type="submit" class="formbtn" value="Save"> <input class="formbtn" type="button" value="Cancel" onclick="history.back()" /> <?php if (isset($id) && $a_cron[$id]): ?> - <input name="id" type="hidden" value="<?=$id;?>"> + <input name="id" type="hidden" value="<?=$id;?>" /> <?php endif; ?> </td> </tr> </table> </form> - <br> - <br> - <br> - <br> - <br> - <br> + <br /> + <br /> + <br /> + <br /> + <br /> + <br /> </td> </tr> diff --git a/config/dansguardian/dansguardian.inc b/config/dansguardian/dansguardian.inc index ae2b3264..5f06b75a 100755 --- a/config/dansguardian/dansguardian.inc +++ b/config/dansguardian/dansguardian.inc @@ -301,14 +301,14 @@ function sync_package_dansguardian($via_rpc=false,$install_process=false) { exec("/usr/bin/openssl x509 -hash -noout -in /etc/ssl/demoCA/cacert.pem",$cert_hash); file_put_contents("/usr/local/share/certs/".$cert_hash[0].".0",base64_decode($ca_cert['crt'])); $ca_pem = "cacertificatepath = '/etc/ssl/demoCA/cacert.pem'"; - $generatedcertpath= "generatedcertpath = '/etc/ssl/demoCA/certs/'"; + $generatedcertpath= "generatedcertpath = '".$dansguardian_dir."/ssl/generatedcerts'"; #generatedcertpath = ".$dansguardian_dir . "/ssl/generatedcerts"; $generatedlinkpath= "generatedlinkpath = '".$dansguardian_dir . "/ssl/generatedlinks'"; } $svr_cert = lookup_cert($dansguardian_config["dcert"]); if ($svr_cert != false) { if(base64_decode($svr_cert['prv'])) { - file_put_contents("/etc/ssl/demoCA/private/serverkey.pem",base64_decode($svr_cert['prv'])); + file_put_contents("/etc/ssl/demoCA/private/serverkey.pem",base64_decode($svr_cert['prv']).base64_decode($svr_cert['crt'])); $cert_key = "certprivatekeypath = '/etc/ssl/demoCA/private/serverkey.pem' "; } } @@ -721,7 +721,7 @@ function sync_package_dansguardian($via_rpc=false,$install_process=false) { 'mode'=> "1", 'report_level'=>"global"); - $groups=array("scancleancache","hexdecodecontent","blockdownloads","enablepics","deepurlanalysis","infectionbypasserrorsonly","disablecontentscan","sslcertcheck","sslmitm"); + $groups=array("scancleancache","hexdecodecontent","blockdownloads","enablepics","deepurlanalysis","infectionbypasserrorsonly","disablecontentscan"); #loop on array $count=1; $user_xml=""; @@ -737,7 +737,6 @@ function sync_package_dansguardian($via_rpc=false,$install_process=false) { $dansguardian_groups['embeddedurlweight']=($dansguardian_groups['embeddedurlweight']?$dansguardian_groups['embeddedurlweight']:"0"); $dansguardian_groups['bypass']=($dansguardian_groups['bypass']?$dansguardian_groups['bypass']:"0"); $dansguardian_groups['infectionbypass']=($dansguardian_groups['infectionbypass']?$dansguardian_groups['infectionbypass']:"0"); - $dansguardian_groups['mitmkey']=($dansguardian_groups['mitmkey']?$dansguardian_groups['mitmkey']:"dgs3dD3da"); switch ($dansguardian_groups['reportinglevel']){ case "1": case "2": @@ -761,8 +760,18 @@ function sync_package_dansguardian($via_rpc=false,$install_process=false) { $groupaccessdeniedaddress=""; } - foreach ($groups as $group) + foreach ($groups as $group){ $dansguardian_groups[$group]=(preg_match("/$group/",$dansguardian_groups['group_options'])?"on":"off"); + } + if (preg_match("/sslmitm/",$dansguardian_groups['group_options'])){ + $dansguardian_groups['mitmkey']="mitmkey = '".substr(md5(rand(100000000,999999999)),1,9)."'"; + $dansguardian_groups["sslmitm"]="on"; + $dansguardian_groups["sslcertcheck"]="on"; + } + else{ + $dansguardian_groups["sslmitm"]="off"; + $dansguardian_groups["sslcertcheck"]="off"; + } #create group list files $lists=array("phraseacl" => array("bannedphrase","weightedphrase","exceptionphrase"), "siteacl" => array("bannedsite","greysite","exceptionsite","exceptionfilesite","logsite"), @@ -939,6 +948,7 @@ EOF; $cconf= DANSGUARDIAN_DIR. "/etc/clamd.conf"; $cconf_file=file_get_contents($cconf); if (preg_match("/User (\w+)/",$cconf_file,$matches)){ + mwexec("/usr/sbin/pw user show {$matches[1]} || /usr/sbin/pw user add -n {$matches[1]} -s /usr/sbin/nologin"); $daemonuser = $matches[1]; $daemongroup = 'nobody'; } @@ -1103,8 +1113,8 @@ EOF; if (!(file_exists('/var/db/clamav/main.cvd')||file_exists('/var/db/clamav/main.cld'))){ file_notice("Dansguardian - No antivirus database found for clamav, running freshclam in background.",""); - log_error('No antivirus database found for clamav, running freshclam in background.'); - mwexec_bg(DANSGUARDIAN_DIR.'/bin/freshclam'); + log_error('No antivirus database found for clamav, running freshclam in background. Content-scanner may not work until freshclam finishes.'); + mwexec_bg(DANSGUARDIAN_DIR.'/bin/freshclam && /usr/local/etc/rc.d/clamav-clamd'); } $match=array(); @@ -1130,12 +1140,16 @@ EOF; foreach ($script_file as $script_line){ if(preg_match("/command=/",$script_line)){ $new_clamav_startup.= 'if [ ! -d /var/run/clamav ];then /bin/mkdir /var/run/clamav;fi'."\n"; + $new_clamav_startup.= 'if [ ! -d /var/db/clamav ];then /bin/mkdir /var/db/clamav;fi'."\n"; + $new_clamav_startup.= 'if [ ! -d /var/log/clamav ];then /bin/mkdir -p /var/log/clamav;fi'."\n"; $new_clamav_startup.= "chown -R ".$matches[1]." /var/run/clamav\n"; + $new_clamav_startup.= "chown -R ".$matches[1]." /var/db/clamav\n"; $new_clamav_startup.= "chown -R ".$matches[1]." /var/log/clamav\n"; $new_clamav_startup.=$script_line; } elseif(!preg_match("/(mkdir|chown|sleep|mailscanner)/",$script_line)) { $new_clamav_startup.=preg_replace("/NO/","YES",$script_line); + $new_clamav_startup.=preg_replace("@/usr/local@",DANSGUARDIAN_DIR,$script_line); } } file_put_contents($script, $new_clamav_startup, LOCK_EX); diff --git a/config/dansguardian/dansguardian_groups.xml b/config/dansguardian/dansguardian_groups.xml index 031ae88b..188b6d86 100755 --- a/config/dansguardian/dansguardian_groups.xml +++ b/config/dansguardian/dansguardian_groups.xml @@ -150,11 +150,10 @@ <option><name>Enable Deep URL Analysis (off)</name><value>deepurlanalysis</value></option> <option><name>Infection/Scan Error Bypass on Scan Errors Only (on)</name><value>infectionbypasserrorsonly</value></option> <option><name>Disable content scanning (off)</name><value>disablecontentscan</value></option> - <option><name>Check servers ssl certificates (off)</name><value>sslcertcheck</value></option> <option><name>Filter ssl sites forging SSL Certificates (off)</name><value>sslmitm</value></option> </options> <multiple/> - <size>10</size> + <size>9</size> </field> <field> <fielddescr>Pics</fielddescr> diff --git a/config/dansguardian/dansguardianfx.conf.template b/config/dansguardian/dansguardianfx.conf.template index f5296622..719c0c48 100644 --- a/config/dansguardian/dansguardianfx.conf.template +++ b/config/dansguardian/dansguardianfx.conf.template @@ -376,7 +376,7 @@ sslcertcheck = {$dansguardian_groups['sslcertcheck']} # Forge ssl certificates for all sites, decrypt the data then re encrypt it # using a different private key. Used to filter ssl sites sslmitm = {$dansguardian_groups['sslmitm']} -#mitmkey = '{$dansguardian_groups['mitmkey']}' +{$dansguardian_groups['mitmkey']} EOF; diff --git a/config/iperf.xml b/config/iperf.xml index 3de57441..e5de8b85 100644 --- a/config/iperf.xml +++ b/config/iperf.xml @@ -132,7 +132,7 @@ <type>input</type> </field> <field> - <fielddescr>Socket buffer bize</fielddescr> + <fielddescr>Socket buffer size</fielddescr> <fieldname>window</fieldname> <description>Enter the desired socket buffer size, if needed.</description> <type>input</type> diff --git a/config/iperfserver.xml b/config/iperfserver.xml index 99d8ba34..493c41c8 100644 --- a/config/iperfserver.xml +++ b/config/iperfserver.xml @@ -119,7 +119,7 @@ <type>input</type> </field> <field> - <fielddescr>Socket buffer bize</fielddescr> + <fielddescr>Socket buffer size</fielddescr> <fieldname>window</fieldname> <description>Enter the desired socket buffer size, if needed.</description> <type>input</type> |