OpenBSD CVS

CVS log for src/libexec/spamd/sdl.c


[BACK] Up to [local] / src / libexec / spamd

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.25 / (download) - annotate - [select for diffs], Mon Dec 26 20:06:43 2022 UTC (17 months, 1 week ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, HEAD
Changes since 1.24: +3 -3 lines
Diff to previous 1.24 (colored)

spelling fixes; from paul tagliamonte

Revision 1.24 / (download) - annotate - [select for diffs], Wed Oct 18 17:31:01 2017 UTC (6 years, 7 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.23: +45 -1 lines
Diff to previous 1.23 (colored)

Make blacklist entries override the whitelist.  When running spamd
in greylisting mode, it is not uncommon for an IP to get whitelisted
before it shows up on a spam blacklist.  With this change, spamd
will check its blacklists before adding a WHITE entry to the
<spamd-white> pf table.  If the IP matches a blacklist, the WHITE
entry will be removed.  OK phessler@

Revision 1.23 / (download) - annotate - [select for diffs], Tue Oct 17 13:52:10 2017 UTC (6 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.22: +130 -36 lines
Diff to previous 1.22 (colored)

Use a binary search to speed up blacklist lookups.  OK phessler@

Revision 1.22 / (download) - annotate - [select for diffs], Mon May 18 16:04:21 2015 UTC (9 years ago) by reyk
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored)

Change spamd to use divert-to instead of rdr-to.

divert-to has many advantages over rdr-to for proxies.  For example,
it is much easier to use, requires less code, does not depend on
/dev/pf, works in-band without the asynchronous lookup (DIOCNATLOOK
ioctl), saves us from additional port allocations by the rdr/NAT code,
and even avoids potential collisions and race conditions that could
theoretically happen with the lookup.

Heads up: users will have to update their spamd PF rules from rdr-to
to divert-to.  spamd now also listens to 127.0.0.1 instead of "any"
(0.0.0.0) by default which should be fine with most setups but has to
be considered for some special configurations.

Based on a diff is almost two years old but got delayed several times
... beck@: "now is the time to get it in" :)

Tested by many
With help from okan@
OK okan@ beck@ millert@

Revision 1.21 / (download) - annotate - [select for diffs], Tue Jan 13 21:42:59 2015 UTC (9 years, 4 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.20: +193 -124 lines
Diff to previous 1.20 (colored)

Use address-family specific lists of addr/mask entries instead of
a union that can store either ipv4 or ipv6.  The old method used
4x as much memory as was really needed for ipv4.  The spamd-setup
protocol has changed from: tag;message;a/m;a/m;a/m...\n
to :tag;message;af;count;a/m;a/m;a/m...[af;count;a/m;a/m;a/m]\n
OK phessler@ "nice" beck@

Revision 1.20 / (download) - annotate - [select for diffs], Thu Jan 8 22:10:08 2015 UTC (9 years, 5 months ago) by millert
Branch: MAIN
Changes since 1.19: +18 -13 lines
Diff to previous 1.19 (colored)

Avoid a crash (free of bogus pointer) when there is a syntax error
reading the config socket by clearing the entire blacklist struct
instead of just the tag string.  Also avoid holes in the blacklist
array on error since the code can't cope with them.  OK beck@

Revision 1.19 / (download) - annotate - [select for diffs], Sat Oct 11 03:25:16 2014 UTC (9 years, 8 months ago) by doug
Branch: MAIN
Changes since 1.18: +4 -4 lines
Diff to previous 1.18 (colored)

Userland reallocarray() audit.

Avoid potential integer overflow in the size argument of malloc() and
realloc() by using reallocarray() to avoid unchecked multiplication.

ok deraadt@

Revision 1.18 / (download) - annotate - [select for diffs], Sat Nov 3 19:16:07 2007 UTC (16 years, 7 months ago) by beck
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.17: +22 -1 lines
Diff to previous 1.17 (colored)



PR 5621 - spamd doesn't clear the last entry from an empty TRAP list,
noticed and patch from Piotr Sikora <piotr@sikora.nu>

Revision 1.17 / (download) - annotate - [select for diffs], Sun Sep 2 15:19:20 2007 UTC (16 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)

use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsg

Revision 1.16 / (download) - annotate - [select for diffs], Mon Mar 26 16:36:18 2007 UTC (17 years, 2 months ago) by beck
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.15: +12 -20 lines
Diff to previous 1.15 (colored)

use new license.

Revision 1.15 / (download) - annotate - [select for diffs], Mon Mar 5 02:10:46 2007 UTC (17 years, 3 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

spacing

Revision 1.14 / (download) - annotate - [select for diffs], Fri Feb 23 19:36:23 2007 UTC (17 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.13: +18 -18 lines
Diff to previous 1.13 (colored)

continue collecting lint to be sold as a parsley substitute; ok beck

Revision 1.13 / (download) - annotate - [select for diffs], Thu Aug 4 09:48:27 2005 UTC (18 years, 10 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.12: +4 -3 lines
Diff to previous 1.12 (colored)

Fix handling of empty entries at the end of an address list; avoids
always skipping the last address.  ok beck@

Revision 1.12 / (download) - annotate - [select for diffs], Thu Feb 26 08:18:56 2004 UTC (20 years, 3 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.11: +2 -1 lines
Diff to previous 1.11 (colored)

paranoia; beck ok

Revision 1.11 / (download) - annotate - [select for diffs], Thu Feb 26 07:28:55 2004 UTC (20 years, 3 months ago) by beck
Branch: MAIN
Changes since 1.10: +8 -8 lines
Diff to previous 1.10 (colored)

Add -g option for greylisting support for spamd. The greylisting techinque
originates from a paper by Evan Harris which can be found at
http://projects.puremagic.com/greylisting/. This implementation makes
spamd allow for non-blacklisted addresses to be treated as "greylisted".
where they are tracked in a db file, and whitelisted by addition to a
pf table when the same envelope from and to are retried from the same
source IP address. Testing by many, ok deraadt@

Revision 1.10 / (download) - annotate - [select for diffs], Fri Sep 26 16:07:29 2003 UTC (20 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.9: +4 -10 lines
Diff to previous 1.9 (colored)

can free(NULL)

Revision 1.9 / (download) - annotate - [select for diffs], Sat Sep 20 00:43:10 2003 UTC (20 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.8: +5 -4 lines
Diff to previous 1.8 (colored)

knf

Revision 1.8 / (download) - annotate - [select for diffs], Fri Aug 22 21:50:34 2003 UTC (20 years, 9 months ago) by david
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

pf spelling police
ok dhartmei@ jmc@

Revision 1.7 / (download) - annotate - [select for diffs], Sun Jul 6 21:57:27 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.6: +3 -1 lines
Diff to previous 1.6 (colored)

bring protos into scope

Revision 1.6 / (download) - annotate - [select for diffs], Mon Mar 3 22:22:23 2003 UTC (21 years, 3 months ago) by cloder
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.5: +47 -15 lines
Diff to previous 1.5 (colored)

Better handling of parse errors and/or allocation
failures.  Add two functions, sdl_free() and
sdl_clear(), use them where needed.  Misc. other
cleanup and optimization.
OK deraadt@

Revision 1.5 / (download) - annotate - [select for diffs], Mon Mar 3 20:17:50 2003 UTC (21 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.4: +12 -9 lines
Diff to previous 1.4 (colored)

knf

Revision 1.4 / (download) - annotate - [select for diffs], Mon Mar 3 14:47:37 2003 UTC (21 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.3: +4 -1 lines
Diff to previous 1.3 (colored)

always set ptr to NULL after free; from cloder

Revision 1.3 / (download) - annotate - [select for diffs], Sun Mar 2 20:40:15 2003 UTC (21 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.2: +9 -7 lines
Diff to previous 1.2 (colored)

knf

Revision 1.2 / (download) - annotate - [select for diffs], Sun Mar 2 20:32:05 2003 UTC (21 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.1: +3 -3 lines
Diff to previous 1.1 (colored)

knf

Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 2 19:22:00 2003 UTC (21 years, 3 months ago) by beck
Branch: MAIN

Spamd changes to add blacklist awareness to spamd, new spamd-setup.pl
which configures individual blacklists sources and deals with whitelists.
Perl still needs some stylistic changes as suggested by bmc which will go
in shortly.
ok deraadt@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.