diff options
Diffstat (limited to 'config/spamd/spamd_db_ext.php')
-rw-r--r-- | config/spamd/spamd_db_ext.php | 10 |
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 +?> |