- remove 6 out of the 10 flavors maze, only keep the ones that make sense (ie clamav, ldap, domainscale & largescale) - build pgsql & mysql drivers as subpackages, as $DEITY intended - @pkgpath & PFRAG.[flavor]-main tweaks from sthen@ (thanks!) - remove init_pwent_cache() patch until i can make some sense of it - remove painful strlcpy patches - add patches to fix pgsql support with PSQL > 9.1 from http://sourceforge.net/p/dspam/bug-tracker/112/ & http://sourceforge.net/p/dspam/bug-tracker/141 - add an rc script running dspam --daemon as _dspam - patch default dspam.conf to trust user _dspam (pointed out by jca@; thanks!) and to use port 2424 by default. Taken from debian. Discussed at length with todd@ (MAINTAINER), been running on amd64 with pgsql &| sqlite backend since a while, also tested on sqlite/ppc. Some tweaks might still be needed (a README ? Fix some weird crashers ?), but at least it's better than what we had for the past years.
53 lines
1.8 KiB
Plaintext
53 lines
1.8 KiB
Plaintext
$OpenBSD: patch-src_dspam_c,v 1.9 2013/09/14 17:12:12 landry Exp $
|
|
--- src/dspam.c.orig Wed Apr 11 20:48:33 2012
|
|
+++ src/dspam.c Sat Jan 5 16:11:50 2013
|
|
@@ -415,7 +415,7 @@ process_message (
|
|
CTX->confidence = 1.0;
|
|
STATUS("A virus was detected in the message contents");
|
|
result = DSR_ISSPAM;
|
|
- strcpy(CTX->class, LANG_CLASS_VIRUS);
|
|
+ strlcpy(CTX->class, LANG_CLASS_VIRUS, sizeof (CTX->class));
|
|
internally_canned = 1;
|
|
if(!_ds_match_attribute(agent_config, "TrackSources", "virus")) {
|
|
if (!dspam_getsource (CTX, ip, sizeof (ip)))
|
|
@@ -433,7 +433,7 @@ process_message (
|
|
CTX->result = DSR_ISSPAM;
|
|
CTX->probability = 1.0;
|
|
CTX->confidence = 1.0;
|
|
- strcpy(CTX->class, LANG_CLASS_BLOCKLISTED);
|
|
+ strlcpy(CTX->class, LANG_CLASS_BLOCKLISTED, sizeof (CTX->class));
|
|
internally_canned = 1;
|
|
}
|
|
|
|
@@ -826,10 +826,10 @@ process_message (
|
|
|
|
switch (CTX->result) {
|
|
case DSR_ISSPAM:
|
|
- strcpy(data, "Spam");
|
|
+ strlcpy(data, "Spam", sizeof (data));
|
|
break;
|
|
default:
|
|
- strcpy(data, "Innocent");
|
|
+ strlcpy(data, "Innocent", sizeof (data));
|
|
break;
|
|
}
|
|
|
|
@@ -1114,7 +1114,7 @@ int tag_message(AGENT_CTX *ATX, ds_message_t message)
|
|
int tagged = 0;
|
|
char spam_subject[16];
|
|
|
|
- strcpy(spam_subject, "[SPAM]");
|
|
+ strlcpy(spam_subject, "[SPAM]", sizeof (spam_subject));
|
|
if (_ds_pref_val(ATX->PTX, "spamSubject")[0] != '\n' &&
|
|
_ds_pref_val(ATX->PTX, "spamSubject")[0] != 0)
|
|
{
|
|
@@ -1709,7 +1709,7 @@ int process_users(AGENT_CTX *ATX, buffer *message) {
|
|
if (parse_message == NULL) {
|
|
LOG(LOG_CRIT, ERR_MEM_ALLOC);
|
|
presult->exitcode = ERC_PROCESS;
|
|
- strcpy(presult->text, ERR_MEM_ALLOC);
|
|
+ strlcpy(presult->text, ERR_MEM_ALLOC, sizeof (presult->text));
|
|
|
|
if (ATX->results) {
|
|
nt_add(ATX->results, presult);
|