Change the error reporting pattern throughout the tree when unveilfails to report the path that the failure occured on. Suggested byderaadt@ after some tech discussion.Work done and verified by A
Change the error reporting pattern throughout the tree when unveilfails to report the path that the failure occured on. Suggested byderaadt@ after some tech discussion.Work done and verified by Ashton Fagg <ashton@fagg.id.au>ok deraadt@ semarie@ claudio@
show more ...
Fix copy pasto, re-add missing goto in error path.
Yet another workaround for crappy libpcap API designAdd an internal version of pcap_open_live that ensures bpf(4) devicesare opened read-only before locking. Neither pflogd(8) or spamlogd(8)requi
Yet another workaround for crappy libpcap API designAdd an internal version of pcap_open_live that ensures bpf(4) devicesare opened read-only before locking. Neither pflogd(8) or spamlogd(8)require write access to bpf(4). Inspired by similar solution inOpenBSD tcpdump(8).pflogd(8) was safe since being unveiled last year, but spamlogd(8)was having /dev/bpf opened O_RDWR.Issue discovered by bluhm@'s unveil(2) accounting commit.ok deraadt@, mestre@ (thanks for testing spamlogd!)
When system calls indicate an error they return -1, not some arbitraryvalue < 0. errno is only updated in this case. Change all (most?)callers of syscalls to follow this better, and let's see if
When system calls indicate an error they return -1, not some arbitraryvalue < 0. errno is only updated in this case. Change all (most?)callers of syscalls to follow this better, and let's see if this strictnesshelps us in the future.
The only file that spamlogd(8) needs to access after calling pledge(2) isPATH_SPAMD_DB, so unveil(2) it with O_RDWR permissions.OK millert@ beck@
add missing ${LIBCRYPTO} to DPADDOK deraadt@ millert@ jca@
- Check if user running spamlogd(8) has root privileges and if not then stopprogram early- #define SPAMD_USER "_spamd" and use it on getpwnam(3) call- Set usage() as __dead void- Remove lint-styl
- Check if user running spamlogd(8) has root privileges and if not then stopprogram early- #define SPAMD_USER "_spamd" and use it on getpwnam(3) call- Set usage() as __dead void- Remove lint-style commentsOK beck@
pledge spamlogd - again from Ricardo Mestre <serial@helheim.mooo.com> - Thanks!
Include <netinet/in.h> before <net/pfvar.h>. In a future change whenports is ready, <net/pfvar.h> will stop including a pile of balony.
Replace <sys/param.h> with <limits.h> and other less dirty headers wherepossible. Annotate <sys/param.h> lines with their current reasons. Switchto PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_N
Replace <sys/param.h> with <limits.h> and other less dirty headers wherepossible. Annotate <sys/param.h> lines with their current reasons. Switchto PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. ChangeMIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() wheresensible to avoid pulling in the pollution. These are the files confirmedthrough binary verification.ok guenther, millert, doug (helped with the verification protocol)
Remove unnecessary netinet/in_systm.h include.ok millert@
Some missing .Pa macros in FILES sections;from Jan Stary <hans at stare dot cz>;discussed with jmc@.
Remove the use of time_t in the greylist db file and use int64_t insteadwith backwards compatibility for records with 32-bit times.OK deraadt@ beck@
actually set and use whiteexp in the new -W option.my goof noticed by Boudewijn Dijkstra.ok beck@
add -W flag (whiteexp), as opposed to pulling in a hardcoded defaultvalue from spamd/grey.c; mostly from ohauer@gmx.de in PR/6142.ok beck@
merge/update the spamlogd rules into spamd - there were some subtleproblems because of the recent pf nat changes that caused problems;i've fleshed out the example in spamd and just added a pointer
merge/update the spamlogd rules into spamd - there were some subtleproblems because of the recent pf nat changes that caused problems;i've fleshed out the example in spamd and just added a pointer to itfrom spamlogd;ok beck
add a missing full stop; noticed by frantisek holop <minusf at obiit dot org>while here, add a missing comma and a missing word, too; ok jmc@
yes, all; girishvenkatachalam
convert to new .Dd format;
nuke annoying debug logok henning@
Make spamlogd log inbound/outbound like it did before.ok henning@
tweaks;
cleanup usage
Database synchronizaton for spamd/spamlogdThis adds an HMAC protected synchronization protocol for use by spamd andspamlogd.- spamd can receive updates from other hosts for GREY, WHITE, and TRAP
Database synchronizaton for spamd/spamlogdThis adds an HMAC protected synchronization protocol for use by spamd andspamlogd.- spamd can receive updates from other hosts for GREY, WHITE, and TRAPPED dbentries, and will update the local /var/db/spamd accordingly.- spamd can send updates when it makes changes to the GREY or TRAPPEDentries in the db to other hosts running spamd. (Note it does not sendWHITE entries because the other spamd will see the GREY changes and havecomplete information to make appropritate decisions)- spamlogd can send updates for WHITE db entries that it performs on the localdb to other hosts running spamd, which will then apply them on remote hosts.note that while this diff provides synchronization for changes made to thespamd db by the daemons, it does *not* provide for sychonizing changesto the spamd db made manually with the spamdb command.Synchronization protocol and most of the work by reyk@,with a bunch of the spamd, and spamlogd stuff by me.testing mostly at the U of A, running happily there under big load.ok reyk@ jmc@
sync slightly w/ spamd(8);
12