Commit 1f787508 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

* Tagged v2.0.10 release

parent 5c4814be
This diff is collapsed.
...@@ -436,18 +436,16 @@ sub check { ...@@ -436,18 +436,16 @@ sub check {
# Check if we already have an expired autoblacklist entry, this happens if the cleanup has not run yet # Check if we already have an expired autoblacklist entry, this happens if the cleanup has not run yet
if (defined($currentAutoBlacklistEntry)) { if (defined($currentAutoBlacklistEntry)) {
# Update blacklisting to the new details # Update blacklisting to the new details
$sth = DBDo(' $sth = DBDo("
UPDATE UPDATE
greylisting_autoblacklist greylisting_autoblacklist
SET SET
TrackKey = ?, TrackKey = ".DBQuote($key).",
Added = ?, Added = ".DBQuote($sessionData->{'Timestamp'}).",
Comment = ? Comment = ".DBQuote($blacklist)."
WHERE WHERE
ID = ? ID = ".DBQuote($currentAutoBlacklistEntry)."
', ");
$key,$sessionData->{'Timestamp'},$blacklist,$currentAutoBlacklistEntry
);
if (!$sth) { if (!$sth) {
$server->log(LOG_ERR,"[GREYLISTING] Database update failed: ".cbp::dblayer::Error()); $server->log(LOG_ERR,"[GREYLISTING] Database update failed: ".cbp::dblayer::Error());
return $server->protocol_response(PROTO_DB_ERROR); return $server->protocol_response(PROTO_DB_ERROR);
...@@ -455,14 +453,16 @@ sub check { ...@@ -455,14 +453,16 @@ sub check {
# If we don't have an entry we can use, create one # If we don't have an entry we can use, create one
} else { } else {
# Record blacklisting # Record blacklisting
$sth = DBDo(' $sth = DBDo("
INSERT INTO greylisting_autoblacklist INSERT INTO greylisting_autoblacklist
(TrackKey,Added,Comment) (TrackKey,Added,Comment)
VALUES VALUES
(?,?,?) (
', ".DBQuote($key).",
$key,$sessionData->{'Timestamp'},$blacklist ".DBQuote($sessionData->{'Timestamp'}).",
); ".DBQuote($blacklist)."
)
");
if (!$sth) { if (!$sth) {
$server->log(LOG_ERR,"[GREYLISTING] Database insert failed: ".cbp::dblayer::Error()); $server->log(LOG_ERR,"[GREYLISTING] Database insert failed: ".cbp::dblayer::Error());
return $server->protocol_response(PROTO_DB_ERROR); return $server->protocol_response(PROTO_DB_ERROR);
...@@ -671,33 +671,34 @@ sub check { ...@@ -671,33 +671,34 @@ sub check {
# Check if we already have an expired autowhitelist entry, this happens if the cleanup has not run yet # Check if we already have an expired autowhitelist entry, this happens if the cleanup has not run yet
if (defined($currentAutoWhitelistEntry)) { if (defined($currentAutoWhitelistEntry)) {
# Update whitelisting to the new details # Update whitelisting to the new details
$sth = DBDo(' $sth = DBDo("
UPDATE UPDATE
greylisting_autowhitelist greylisting_autowhitelist
SET SET
TrackKey = ?, TrackKey = ".DBQuote($key).",
Added = ?, Added = ".DBQuote($sessionData->{'Timestamp'}).",
LastSeen = ?, LastSeen = ".DBQuote($sessionData->{'Timestamp'}).",
Comment = ? Comment = ".DBQuote($whitelist)."
WHERE WHERE
ID = ? ID = ".DBQuote($currentAutoWhitelistEntry)."
', ");
$key,$sessionData->{'Timestamp'},$sessionData->{'Timestamp'},$whitelist,$currentAutoWhitelistEntry
);
if (!$sth) { if (!$sth) {
$server->log(LOG_ERR,"[GREYLISTING] Database update failed: ".cbp::dblayer::Error()); $server->log(LOG_ERR,"[GREYLISTING] Database update failed: ".cbp::dblayer::Error());
return $server->protocol_response(PROTO_DB_ERROR); return $server->protocol_response(PROTO_DB_ERROR);
} }
} else { } else {
# Update whitelisting to the new details # Update whitelisting to the new details
$sth = DBDo(' $sth = DBDo("
INSERT INTO greylisting_autowhitelist INSERT INTO greylisting_autowhitelist
(TrackKey,Added,LastSeen,Comment) (TrackKey,Added,LastSeen,Comment)
VALUES VALUES
(?,?,?,?) (
', ".DBQuote($key).",
$key,$sessionData->{'Timestamp'},$sessionData->{'Timestamp'},$whitelist ".DBQuote($sessionData->{'Timestamp'}).",
); ".DBQuote($sessionData->{'Timestamp'}).",
".DBQuote($whitelist)."
)
");
if (!$sth) { if (!$sth) {
$server->log(LOG_ERR,"[GREYLISTING] Database insert failed: ".cbp::dblayer::Error()); $server->log(LOG_ERR,"[GREYLISTING] Database insert failed: ".cbp::dblayer::Error());
return $server->protocol_response(PROTO_DB_ERROR); return $server->protocol_response(PROTO_DB_ERROR);
......
...@@ -34,7 +34,7 @@ our (@ISA,@EXPORT,@EXPORT_OK); ...@@ -34,7 +34,7 @@ our (@ISA,@EXPORT,@EXPORT_OK);
use constant { use constant {
VERSION => "2.0.10a", VERSION => "2.0.10",
}; };
# vim: ts=4 # vim: ts=4
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# this path is hardcoded # this path is hardcoded
%define cblibdir %{_libdir}/policyd-2.0 %define cblibdir %{_libdir}/policyd-2.0
%define version 2.0.10a %define version 2.0.10
%define release 1 %define release 1
%define tarver %{version} %define tarver %{version}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment