summaryrefslogtreecommitdiff
path: root/usr.bin/newsyslog
AgeCommit message (Collapse)Author
2003-02-12Add support for rotating files at a specific time; from FreeBSDTodd C. Miller
2003-02-09typos;Jason McIntyre
2003-01-25it is 2003 nowTodd C. Miller
2003-01-25Move parsing of the monitor notification user with the rest of theTodd C. Miller
optional arguments and add some sanity checking (if the M flag is specified a notification user must be specified as well). Also make the -n flag work in conjunction with -m and make verbose mode more monitor-friendly. deraadt@ OK
2003-01-25Make monitor section match the actual code.Todd C. Miller
2003-01-06typo; jmc@prioris.mini.pw.edu.plTheo de Raadt
2002-12-23Display offending line number in error messages.Todd C. Miller
Based on a patch from Sam Smith.
2002-11-27typo; Tor HoughtonTodd C. Miller
2002-11-07Sigh, sizes are in KB, not bytes, which made the cutoff size forTodd C. Miller
rotating a file 512KB instead of 512 bytes, as was intended. Change things to deal in bytes internally and drop the cutoff to 256 bytes.
2002-09-21When rotating files or checking the age of a file, check for bothTodd C. Miller
compressed and uncompressed logs but consult the flags to see which we one prefer should both exist. This keeps things from getting hosed if someone compresses or uncompresses one of the archived log files.
2002-09-19Deal with someone specifying an empty string for the command to runTodd C. Miller
and make it mean "send no signal and run no command".
2002-09-19Fix long-standing bug. When specifying a command to run instead of sendingTodd C. Miller
a signal, the command was never actually run.
2002-09-19Since isspace() considers \n to be a space we need to check for startTodd C. Miller
of line == \0, not \n after stripping leading blanks. Otherwise blank lines give an error. Noticed by marc@
2002-09-17Allow user to restrict logs to be rotated by specifying pathnames onTodd C. Miller
the command line. The default is to rotate all files in newsyslog.conf
2002-09-17Add -F (force) flag; inspired by FreeBSDTodd C. Miller
2002-09-17Add -a flag to specify a directory to store archived logs. Based onTodd C. Miller
changes I made years ago to a private version of newsyslog but with the option renamed to match FreeBSD. Note that unlike the FreeBSD -a flag, we don't automagically create the archive dir if it doesn't exist. OK deraadt@ and todd@
2002-09-16o Remove "NONE" #define and check uid_t and gid_t against -1 with proper castsTodd C. Miller
o Don't call chown/fchown if neither uid nor gid was specified o Fix check for symlinks in non-verbose mode o Add DPRINTF macro to simplify code in verbose mode o Print B and F flags in -v and -n modes o Add a leading tab to lines printed in -n mode for clarity
2002-09-13remove trailing whitespaceTodd C. Miller
2002-09-13Don't rotate log files < 512 bytes unless in binary mode. ThisTodd C. Miller
prevents newsyslog from rotating a file that only contains the messages that the log file was turned over. deraadt@ OK
2002-09-13Use .Dv for SIGUSR1 like all the other signal names.Todd C. Miller
2002-09-13KNF + ANSI; deraadt@ OKTodd C. Miller
2002-09-12add missing include of limits.hTodd C. Miller
2002-08-12Swap args to calloc(3) so they are in the correct order; art@ ok.Aaron Campbell
2002-06-26Don't follow symbolic links for (ie. user-owned) log files by default;Wilbern Cobb
closes pr #1913. ok millert@
2002-06-12a real pid_t cleanup.Mike Pechkin
espie@ ok for make/, deraadt@ one extra eye, millert@ ok
2002-02-16Part one of userland __P removal. Done with a simple regexp with some minor ↵Todd C. Miller
hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
2001-11-27Fix uninitialized variable introduced in rev 1.40; found by lebel@Todd C. Miller
If fgets() fails, set err to a reasonable value. Otherwise we could send the signal to pid 0 which would be bad...
2001-11-24handle NL terminated pid files correctly, OK deraadt@Marco S Hyman
2001-11-23greater care at reading pidfiles; millert okTheo de Raadt
2001-11-19kill more registersMike Pechkin
millert@ ok
2001-11-16errno safety in SIGCHLD handlerTheo de Raadt
2001-08-21MLINK to config file man pageTheo de Raadt
2001-08-02o) .Sh AUTHOR -> .Sh AUTHORS;Mike Pechkin
o) .Sh EXAMPLE -> .Sh EXAMPLES; o) Delete .Sh OPTIONS. Text moved to .Sh DESCRIPTION; millert@ ok
2001-07-09correct type on last arg to execl(); nordin@cse.ogi.eduTheo de Raadt
2001-03-01Remove -t option from getopt() since it doesn't exist; mpech@prosoft.org.lv.Aaron Campbell
Also rearrage options in the man page while I'm here.
2001-01-12various small cleanupsTheo de Raadt
2000-06-30warnx?/errx? paranoia (use "%s" not a bare string unless it is aTodd C. Miller
constant). These are not security holes but it is worth fixing them anyway both for robustness and so folks looking for examples in the tree are not misled into doing something potentially dangerous. Furthermore, it is a bad idea to assume that pathnames will not include '%' in them and that error routines don't return strings with '%' in them (especially in light of the possibility of locales).
2000-06-14monitor -> monitormode because some OSes have a monitor(3)Todd C. Miller
2000-06-12Make the flags field truly optional.Todd C. Miller
2000-06-10Increment pl when filling in pidlist. It was just overwriting the firstTodd C. Miller
entry each time. Unless you have multiple pid files you don't notice which is why this slipped through the cracks. Noted by Jonathan Rozes.
2000-06-02Explicitly state that newsyslog does not send a HUP to syslogd ifTodd C. Miller
you tell it to run a command for the log file.
2000-03-10Various cleanups and standardization.Aaron Campbell
2000-03-05Finish standardizing options list introduction.Aaron Campbell
1999-11-11Add support for sending signals other than SIGHUP and optionallyTodd C. Miller
run a command instead of sending a signal.
1999-11-09calloc an array of char *, not pid_t (left over from previous implementation).Todd C. Miller
1999-11-09Avoid sending a HUP to a process multiple times. Ie: instead of oneTodd C. Miller
per log file, do one per pid file (but only if the pid file corresponds to a log file that was rotated).
1999-11-07compress_log() now needs to check for noaction != 0Todd C. Miller
1999-11-07Don't send a HUP or compress the log files until _everything_ has beenTodd C. Miller
rotated. Fixes a race condition between syslogd and newsyslog whereby syslogd could be reinitializing (due to SIGHUP) while newsyslog was rotating the next log file.
1999-11-07o Some KNF + consistent indentation for readabilityTodd C. Miller
o When pid file cannot be opened give a sensible warning o Use fchmod when we can o Check more return values o Use uid_t/gid_t when sensible o When computing kbytes from blocks do so in such a way that is not likely to cause wrap. o Sanity check path lengths to avoid chance of oflow
1999-11-06Back out version 1.21 since it breaks age rotation.Todd C. Miller