summaryrefslogtreecommitdiff
path: root/libexec/mail.local/locking.c
AgeCommit message (Collapse)Author
2020-05-27Remove support for world-writable mail spools.Todd C. Miller
They won't work any more due to pledge restrictions so just print an error and exit if the spool is world-writable. OK beck@
2020-02-09Use sysexits.h exit values to distinguish between tempfail and permfail.Todd C. Miller
Unix MTAs use the exit value of the MDA (here mail.local) to determine whether or not a failure to deliver mail should be considered to be a temporary or permanent failure. OK semarie@ beck@
2020-02-02Allow mail.local to be run as non-root.Todd C. Miller
If mail.local is invoked by a non-root user, open a pipe to lockspool(1) for file locking. It is only possible to delivery to a pre-existing mail spool when running mail.local as non-root. OK gilles@ deraadt@
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers whereTheo de Raadt
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)
2014-01-17Close file descriptor before next try getting a good one.Tobias Stoeckmann
ok millert@
2011-01-10Back out rev 1.2 and use mkstemp(), not mktemp(). OK deraadt@Todd C. Miller
2009-10-28rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andTheo de Raadt
unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
2006-04-01minor lint cleaning; ok millertTheo de Raadt
2003-07-10add missing includesDavid Krause
ok deraadt@ tedu@
2002-07-03KNFTheo de Raadt
2002-02-19We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.Todd C. Miller
2002-02-17Call S_ISLNK with correct variable; Peter PhilippTodd C. Miller
2001-08-18err() -> merr(), and reorder some bugs noted by giannici@neomedia.it; ↵Theo de Raadt
millert helped
1998-08-15go back to using mktemp, not mkstemp in baditem(); theoTodd C. Miller
1998-08-15Break out locking code into its own file so it can be shared with lockspool.Todd C. Miller
Call lockspool when invoked with -H flag for backward compatibility.