summaryrefslogtreecommitdiffstats
path: root/libexec/spamd-setup/spamd-setup.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* allow fetching lists from https:// URLs toodjm2017-07-071-2/+2
|
* switch user to _spamd before executing ftp(1) to fetch lists.djm2017-07-071-6/+34
| | | | sprinkle in some closefrom(2); ok deraadt@ beck@
* pledge(2) spamd-setup(8)mestre2016-01-041-5/+8
| | | | | | | | | | | | | | | It needs these annotations, to at least run the operations next to them: stdio: malloc(3) rpath: open(2) inet: connect(2)/socket(2) proc: fork(2) exec: execvp(3) While here remove netinet/in.h since all we need is already in arpa/inet.h and sort the headers alphabetically OK beck@
* Remove NULL-checks before free(). ok tb@mmcc2015-12-121-3/+2
|
* Do not assume that asprintf() clears the pointer on failure, whichmillert2015-06-031-4/+3
| | | | | is non-portable. Also add missing asprintf() return value checks. OK deraadt@ guenther@ doug@
* Allocate a bit more memory to reduce the change of having tomillert2015-01-201-9/+13
| | | | realloc() which is expensive for large blacklists.
* Does not need netinet/ip_ipsp.hderaadt2015-01-191-2/+1
|
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-161-2/+4
| | | | | | | | | possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
* Replace "errx(1, "malloc failed")" with "err(1, NULL)" to getmillert2015-01-141-9/+9
| | | | standard "Cannot allocate memory" message.
* Fix printing of number of whitelist entries in debug mode.millert2015-01-131-4/+7
|
* Use address-family specific lists of addr/mask entries instead ofmillert2015-01-131-13/+16
| | | | | | | | 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@
* obvious reallocarray() conversionsderaadt2014-10-091-6/+7
|
* remove some unnecessary sys/param.h inclusionsderaadt2012-12-041-2/+1
|
* Change the way memory is allocated to reduce memory footprint. Loading theclaudio2009-09-091-80/+68
| | | | | | | | | large uatraps uses now around 8 times less memory. Other cleanup includes a fast implementation of imask() (stolen from bgpd), killing some unused code and try to estimate the memory needed in add_blacklist() to reduce the realloc() calls. Tested by many (sthen, matthieu, Stephan A. Rickauer) OK beck@, sthen@
* Protect errno.ray2009-06-021-3/+5
| | | | OK millert
* -D before -d;jmc2008-10-031-2/+2
|
* New option -D to daemonize spamd-setup for early bootup use. This avoidsderaadt2008-10-031-4/+10
| | | | | | | | spamd-setup hanging if there are various (network?) issues and the system not proceeding to multiuser so that this can be debugged. We do not use & for startup in /etc/rc because this makes the spamd-setup a child of the rc scripts after bootup (that is gross) Problem reported in PR 5864, change discussed with beck, ok millert
* use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsgderaadt2007-09-021-3/+3
|
* Flag day for spamd -beck2007-02-271-7/+7
| | | | | | | | | | 1) config files move to /etc/mail 2) -g option goes away in spamd-setup and spamd - greylisting is now the default 3) option change to spamd, -b addr becomes -l addr. 4) -b option in spamd-setup and spamd to turn on old blacklisting mode. Man page shortly to be flensed to make this easier to explain ok deraadt@ millert@
* Add usage() and error out if given bogus arguments.millert2007-02-251-1/+17
|
* When greylisting we don't actually need to use the <spamd> pf table.millert2007-02-241-30/+43
| | | | | We just do no-rdr for things in <spamd-white> and rdr the rest to spamdb. OK beck@
* Fix some realloc() off-by-one errors found by ray@.millert2007-02-141-13/+7
| | | | | | Also simplify fix_quoted_colons() to avoid realloc entirely since the output buffer is at most 2x the length of the input buffer. Parts adapted from a diff from tdeval@. OK ray@, beck@
* Fix off by one in blacklist memory allocation. From tdeval@millert2007-02-091-2/+2
|
* fix some type definitionsdhill2006-05-111-10/+13
| | | | ok beck
* Remove an extraneous prototypekjell2006-03-261-2/+1
| | | | From Andrey Matveev
* More KNF. Prodding from ray@kjell2006-03-261-76/+76
| | | | No binary change.
* Get this closer to KNF (get rid of block-declared vars)kjell2006-03-261-30/+19
| | | | ok beck@
* KNF. No binary change.kjell2006-03-261-27/+27
|
* Include <sys/param.h> to get MAX macromillert2006-01-171-2/+2
|
* process the last line of an address list even if it's not terminateddhartmei2005-03-021-4/+4
| | | | by newline. found by Rod Whitworth. ok beck@
* clean C for a changederaadt2004-09-161-19/+14
|
* absolutely no need to include machine/endian.h after sys/types.h and sys/types.h after sys/param.hmickey2004-06-291-2/+1
|
* fd leaks; beck okderaadt2004-04-281-2/+4
|
* paranoia; beck okderaadt2004-02-261-2/+11
|
* New spamd configuration method. Many people have trouble with the spamderaadt2004-01-211-12/+44
| | | | | | | RBL sites being slow, so now we will provide the maps ourselves through our www mirrors around the world. We can also now write our own internal translators for maps that are in bad formats, and place them into the www space in the correct format. tested by beck, djm
* cleanupderaadt2004-01-211-15/+19
|
* pf spelling policedavid2003-08-221-4/+4
| | | | ok dhartmei@ jmc@
* spacesderaadt2003-07-291-2/+2
|
* bring protos into scopederaadt2003-07-061-1/+25
|
* ansi cleanup; ok ian markusderaadt2003-06-111-5/+3
|
* use inet_net_pton, and fix probelem where spamd-setup would crash on a filebeck2003-05-161-19/+32
| | | | consisting only of invalid input
* return from mainderaadt2003-04-281-2/+2
|
* make spamd-setup/spamd use/require a reserved source port for thebeck2003-03-131-2/+3
| | | | configuration connection.
* nothing of importderaadt2003-03-101-11/+11
|
* fix exit code, stupid bob, spotted by lebelderaadt2003-03-101-2/+2
|
* Fix a few typos, Make spamd and spamd-setup use /etc/services to findbeck2003-03-091-9/+15
| | | | | their ports. Adds "spamd" and "spamd-cfg" services to /etc/services. Mostly from Daniel Lucq <daniel@lucq.org>.
* missed memset, found by dhartmei@beck2003-03-091-1/+2
|
* knfderaadt2003-03-081-1/+6
|
* KNFderaadt2003-03-081-72/+103
|
* spamd-setup, in c. ok deraadt@, he wants to clean in situ.beck2003-03-081-0/+737