summaryrefslogtreecommitdiff
path: root/usr.bin/newsyslog
AgeCommit message (Collapse)Author
2017-07-24Simplify mail sending.Jeremie Courreges-Anglas
No need for asprintf(3) to concat two string literals. The resulting helper() function is trivial, so inline it. ok schwarze@
2017-07-22Delete extra whitespacesJeremie Courreges-Anglas
2017-07-22err(1, "whatever") -> err(1, NULL) for malloc(3) failuresJeremie Courreges-Anglas
2017-07-20Don't exit on invalid config lines, yet return a proper exit status.Jeremie Courreges-Anglas
newsyslog(8) is mainly used to proces log files, not rotating them because of an invalid field means that /var will end up full. Initially I wanted to ignore only getpwnam/getgrnam errors, but millert@ convinced me otherwise. malloc(3) errors are still fatal. Diff prompted by a report from Harald Dunkel, ok millert@
2017-07-14Don't bother freeing memory just before exiting.Jeremie Courreges-Anglas
Suggested by & ok bluhm@
2017-07-14TAILQs instead of hand-rolled listsJeremie Courreges-Anglas
ok millert@
2017-03-16syslogd(8) -Z generates log files with time in ISO format and UTC.Alexander Bluhm
newsyslog(8) still used the traditional BSD syslog timstamps in local time zone. Convert the latter to the new format unconditionally. It is usefull to have a distinct timestamp including the year at the beginning of every logfile. OK deraadt@ jung@
2016-06-01instead of using the makefile to override ancient defaults in the code,Ted Unangst
change the code to reflect modern reality. ok deraadt millert natano
2016-03-30for some time now mandoc has not required MLINKS to functionJason McIntyre
correctly - logically complete that now by removing MLINKS from base; authors need only to ensure there is an entry in NAME for any function/ util being added. MLINKS will still work, and remain for perl to ease upgrades; ok nicm (curses) bcook (ssl) ok schwarze, who provided a lot of feedback and assistance ok tb natano jung
2016-01-11ajacoutot@ reported seeingtb
newsyslog: preposterous process number in pid file: /var/run/syslog.pid in his log since syslogd ran as pid 2. Nowadays only init runs with a reserved low pid, so decrease MIN_PID from 4 to 2, as suggested by espie@. ok kettenis@
2015-12-09Remove NULL-checks before free(). ok tb@mmcc
2015-11-19backout pledge completely for now, newsyslog needs chown() which is restrictedStuart Henderson
2015-11-18don't drop "pledge exec", it's needed for compression. ok deraadt@Stuart Henderson
2015-11-17pledge() in newsyslog.Sebastian Benoit
go deraadt@
2015-11-14these files document their config files too: adjust NAME accordingly;Jason McIntyre
ok schwarze
2015-08-20Do not cast result of malloc/calloc/realloc* if stdlib.h is in scopeTheo de Raadt
ok krw millert
2015-02-08in getopt() blocks, stop incrementing flag variable which are supposedTheo de Raadt
to just be 0/1 ok miod florian
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-09-16less sendmail specific; ok millertJason McIntyre
2014-09-08obvious cases of missing .An;Ingo Schwarze
found with the new mandoc(1) MANDOCERR_AN_MISSING warning; no text changes
2013-11-26unsigned char casts for ctypeTheo de Raadt
ok krw
2013-04-05rename a variable to hours so it doesn't look like time. ok deraadt guentherTed Unangst
2013-01-17remove uesless Pp;Jason McIntyre
2012-01-15When we only rotate a log file once a month, the "next rotate" outputPeter Hessler
shows the current month, even when that date has passed. Fix to show the correct rotation date. pointed out by jeremy@ OK jeremy@, guenther@, miod@
2011-09-26use, as far as possible, the same notation for date strings as otherJason McIntyre
manual pages; whilst here, a little clean up for clarity ok millert
2011-09-16after some thought, i think it unlikely that we will need to specifyJason McIntyre
a revision number for ISO 8601; in addition, the revision number makes the text unwieldy when discussing the standard in a casual manner. therefore change the macro from -8601-4 to simply -8601, which will output "ISO 8601". i'll get kristaps or ingo to make the change upstream to mandoc. discussed with/ok millert
2011-09-16use .St here for ISO 8601 references; ok millertJason McIntyre
2011-05-19sync manpage and comment with reality. From Nathanael Rensen.lum
ok millert@
2010-07-24Include pid file name in error message for a failed kill(). Prompted byNicholas Marriott
PR 6288. ok deraadt
2010-03-20The newsyslog(8) utility used to keep one archived log file more thanIngo Schwarze
requested; bug reported and patch sent by David Alten. I resolved the problem in a different way, also fixing the following additional issue: When you reduced the "count" in newsyslog.conf(5), the archived logs with higher numbers got orphaned and never deleted. Nic fixed another off-by-one error in this patch, thanks! "I like it; definitely cleaner" DAlten at friedkin dot com ok nicm@
2009-11-28The first paragraph of the DESCRIPTION had multiple issues,Ingo Schwarze
so rewrite it from scratch. Joint work with jmc@. Originally triggered by lars dot curator at gmail dot com by requesting the addition of the word "rotate", also using some observations from matthew at dempsky dot org. OK jmc@ ":-)" sthen@
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
2009-09-10Correct error message when fclose() fails. From Brian Poole.Todd C. Miller
2007-05-31convert to new .Dd format;Jason McIntyre
2007-03-20remove some bogus *p tests from charles longeauTed Unangst
ok deraadt millert
2006-12-11rfc 3834 support: Auto-Submitted: auto-generated on lots of things; from ↵Theo de Raadt
Tamas TEVESZ; ok millert
2006-08-10missing full stop; from matt jibsonJason McIntyre
2006-05-23some clarifications for the "size" field + cleanup;Jason McIntyre
based on a diff from ingo schwarze;
2005-11-30timezone -> time zoneJason McIntyre
2005-03-02sort options while here;Jason McIntyre
2005-03-02rework some .Ss section as .Sy: groff does not like .Ss's in the middleJason McIntyre
of lists;
2004-09-14ARGSUSED before signal handler with unused signoTheo de Raadt
2004-07-11Make newsyslog(8) deal correctly with a count of 0 in newsyslog.conf.Todd C. Miller
Based on a diff from Matthew Gream.
2004-05-10prettyTheo de Raadt
2004-04-09If no user/group is specified for the log file in newsyslog.conf,Todd C. Miller
use the uid/gid of the existing log file. OK deraadt@
2004-04-06Set mode and ownership when renaming file -> file.0 like we do whenTodd C. Miller
moving the file across filesystems or renaming from file.0 -> file.1. Problem noticed by mpech@
2004-04-05o use mode_t, not int for permissions.Todd C. Miller
o use strtol() instead of sscanf() to parse numbers in config file This has been sitting in my tree for a long time...
2004-01-23`Ns' implies `No', so `Ns No' -> `Ns'; (even simpler in adduser(8))Jason McIntyre
discussed with todd@
2003-12-16Avoid segmentation fault when empty commands are specified in theOtto Moerbeek
config file; resolves PR 3578. ok deraadt@ millert@
2003-07-25When parser_file() fails, print correct line number.Mike Pechkin
millert@ ok