aboutsummaryrefslogtreecommitdiffstats
path: root/config/spamd
diff options
context:
space:
mode:
authordoktornotor <notordoktor@gmail.com>2015-08-11 12:13:55 +0200
committerdoktornotor <notordoktor@gmail.com>2015-08-11 12:13:55 +0200
commit0c3d29b311af6aee9df82eb6ffbc0046a589cf87 (patch)
tree825d50b302b31048b4d18427d30f4d88ccda2cb6 /config/spamd
parent6ec653362178f133b7e3947d6505b05f6bdb9e11 (diff)
downloadpfsense-packages-0c3d29b311af6aee9df82eb6ffbc0046a589cf87.tar.gz
pfsense-packages-0c3d29b311af6aee9df82eb6ffbc0046a589cf87.tar.bz2
pfsense-packages-0c3d29b311af6aee9df82eb6ffbc0046a589cf87.zip
spamd_db_ext.php - remove useless config_(un)lock calls
This function does nothing but return.
Diffstat (limited to 'config/spamd')
-rw-r--r--config/spamd/spamd_db_ext.php10
1 files changed, 1 insertions, 9 deletions
diff --git a/config/spamd/spamd_db_ext.php b/config/spamd/spamd_db_ext.php
index 61a90141..010027e3 100644
--- a/config/spamd/spamd_db_ext.php
+++ b/config/spamd/spamd_db_ext.php
@@ -165,7 +165,6 @@ if($_GET['whitelist'] <> "") {
}
function delete_from_spamd_db($srcip) {
- config_lock();
$fd = fopen("/tmp/execcmds", "w");
fwrite($fd, "#!/bin/sh\n");
fwrite($fd, "/usr/local/sbin/spamdb -d {$srcip}\n");
@@ -178,7 +177,6 @@ function delete_from_spamd_db($srcip) {
system("/bin/sh /tmp/execcmds");
mwexec("/usr/bin/killall -HUP spamlogd");
mwexec("/sbin/pfctl -q -t blacklist -T replace -f /var/db/blacklist.txt");
- config_unlock();
}
function basic_auth_prompt(){
@@ -189,17 +187,14 @@ function basic_auth_prompt(){
}
function add_to_blacklist($srcip) {
- config_lock();
$fd = fopen("/var/db/blacklist.txt", "a");
fwrite($fd, "{$srcip}\n");
fclose($fd);
mwexec("/sbin/pfctl -q -t spamd -T add -f /var/db/blacklist.txt");
mwexec("/sbin/pfctl -q -t blacklist -T add -f /var/db/blacklist.txt");
- config_unlock();
}
function delete_from_blacklist($srcip) {
- config_lock();
$blacklist = split("\n", file_get_contents("/var/db/blacklist.txt"));
$fd = fopen("/var/db/blacklist.txt", "w");
foreach($blacklist as $bl) {
@@ -210,11 +205,9 @@ function delete_from_blacklist($srcip) {
fclose($fd);
mwexec("/sbin/pfctl -q -t spamd -T delete $srcip");
mwexec("/sbin/pfctl -q -t blacklist -T replace -f /var/db/blacklist.txt");
- config_unlock();
}
function delete_from_whitelist($srcip) {
- config_lock();
$whitelist = split("\n", file_get_contents("/var/db/whitelist.txt"));
$fd = fopen("/var/db/whitelist.txt", "w");
foreach($whitelist as $wl) {
@@ -225,7 +218,6 @@ function delete_from_whitelist($srcip) {
fclose($fd);
mwexec("/sbin/pfctl -q -t spamd -T delete $srcip");
mwexec("/sbin/pfctl -q -t whitelist -T replace -f /var/db/whitelist.txt");
- config_unlock();
}
function hup_spamd() {
@@ -234,4 +226,4 @@ function hup_spamd() {
exit;
-?> \ No newline at end of file
+?>