Home | History | Annotate | Download | only in newsyslog
History log of /src/usr.bin/newsyslog/newsyslog.c
RevisionDateAuthorComments
 1.62  01-Mar-2021  otis Implement 'E' flag that prevents newsyslog from rotating empty log files.
 1.61  05-Sep-2013  prlw1 Fix
/var/log/httpd/access.log 644 52 * $W0D23 ZBP /var/run/httpd.pid 30
newsyslog: config line 16: bad signal type
(strtol: **endptr is '\0' on success rather than *endptr)
 1.60  17-Jun-2012  christos branches: 1.60.2;
PR/46608: Jim Bernard: Add xz conversion "X"
 1.59  21-Aug-2009  manu branches: 1.59.6;
Reset ziptype on each line. Failure to do this caused any log file to
be compressed if it was listed after a line using Z or J flag. For
instance, we compressed log2 with the config file below:
/var/log/log1 600 5 100 * Z
/var/log/log2 600 7 100 * -
 1.58  20-Jun-2009  christos PR/40274: Takahiro Kambe: "P" flag stops rotating files.
 1.57  17-Feb-2009  dogcow Fix an embarrassing mistake regarding moving down log files. Reported by
(and fix included in) PR bin/40635 from Jukka Salmi.
 1.56  29-Dec-2008  christos branches: 1.56.2;
64 bit time_t
 1.55  31-Oct-2008  christos fix compilation issue
 1.54  31-Oct-2008  christos Import syslogd SoC project by Martin Schuette:
- new syslog protocol api syslogp(3) that supports structured data
and draft-rfc timestamps
- reliable tcp connections with queueing
- encrypted connections
 1.53  21-Dec-2007  dogcow branches: 1.53.10;
It doesn't seem worth it to keep pathnames.h around (especially when it has
non-static data)
 1.52  21-Dec-2007  simonb Fix some whitespace nits.
 1.51  21-Dec-2007  dogcow add new flag to newsyslog(5): J to bzip2 files.
There are no longer any hardcoded gzip-specific args, yay.
And while I was at it, compiles with -Wsigned, too.
 1.50  15-Dec-2007  perry convert __attribute__s to applicable cdefs.h macros
 1.49  22-Jul-2007  christos branches: 1.49.4; 1.49.8;
WARNS=4, pass lint
 1.48  30-Oct-2004  dsl Add (unsigned char) cast to ctype functions
 1.47  13-Oct-2003  lukem Various fixes for when ngen is 0.
 1.46  30-Nov-2002  lukem tweaks for fparseln(3) move from libutil to libc:
- remove #include <util.h> if nothing else needed it
- remove LDFLAGS+=-lutil if nothing else needed it
 1.45  27-Jun-2002  itojun don't let newsyslog follow symlink (could be abused to do tricks).
OpenBSD PR 1913.
 1.44  19-Jun-2002  ad Address PR 16291 by Markus W Kilbinger: newsyslog always compresses archived
log files.
 1.43  11-Feb-2002  wiz branches: 1.43.2;
achive is not a good word.
 1.42  10-Jun-2001  ad Don't sleep before compressing if we didn't send a signal.
 1.41  06-May-2001  ad Sleep for 10 seconds before compressing the old log.
 1.40  22-Mar-2001  ad Get the correct signal type. Pointed out by Hauke Fath <hf@tangro.de> in
bin/12453, real fix by me.
 1.39  18-Mar-2001  ad If configured to rotate at a specfic time and no historical log exists, then
don't consider the age of the historical log.
 1.38  21-Sep-2000  ad New option, `-s': don't bother with PID files or signals.
 1.37  22-Aug-2000  tron Fixed reversed result test in call to chown(2) which caused bogus
error message.
 1.36  22-Aug-2000  tron Use vfork(2) instead of fork(2) to create child process for "gzip" and
wait until it terminates. Problem noted by Enami Tsugutomo on
"current-users@netbsd.org"
 1.35  24-Jul-2000  ad - Wrap line.
- Minor oops in a comment.
 1.34  19-Jul-2000  ad Simple const.
 1.33  19-Jul-2000  enami - Free storage allocated by fparseln.
- Handle comment only or empty line in the parser.
 1.32  18-Jul-2000  ad More work on newsyslog(8):

- Add some comments. It might be getting a little unclear what's going on.
- Make it useful as non-root.

Also, some new features taken from FreeBSD. The last two are not well
tested yet:

- Specifing log files on the command line limits operation to those files.
- Add cyclic time specification for periodic trimming.
- Add restricted ISO-8601 time specification for periodic trimming.
 1.31  13-Jul-2000  ad - Use _PATH_VARRUN.
- Address PR 10577 from mjl: recognise '.' as user/group seperator.
 1.30  11-Jul-2000  ad parse(): be sure to clear *log before filling.
 1.29  11-Jul-2000  ad - Detail flags in manpage using a table.
- Typo patrol.
- Add new flag, `p': keep zero'th historical log file uncompressed (plain).
Inspired by woods' newsyslog package.
 1.28  10-Jul-2000  ad Sorry about breakage - no connectivity at evenings or weekends for me. Anyway:

- Put back `-n' option. This is a slight improvement on its predecessor.
- More paranoid error checking.
- Fix miscellaneous buglets.
 1.27  10-Jul-2000  assar print size_t as casted to (u_long) with %lu
 1.26  09-Jul-2000  aymeric newsyslog wouldn't parse the count field because sscanf return value was
tested against the wrong value (0 != 1)
 1.25  07-Jul-2000  ad Back out previous two.
 1.24  07-Jul-2000  ad Redo previous slightly; add `-m' option to allow multiple instances.
 1.23  07-Jul-2000  ad Don't allow more than one instance when running as root.
 1.22  07-Jul-2000  ad Overhaul newsyslog(8). Changes:

- Code cleanup.
- Better flowing English in manpage (in places).
- `-n' option has been removed (was mainly a debugging convenience, I think).
- Add `C' flag: create log file if one doesn't exist.
 1.21  30-Nov-1999  ad branches: 1.21.4;
- Add '-F' option which forces rotation of logs (from FreeBSD).
- Add 'sigtype' field specifying signal to be sent (from FreeBSD).
- Add 'N' flag which specifies that no signal should be sent.
- Fix some breakage.
 1.20  06-Oct-1999  ad Add a new optional parameter to the configuration file, specifying the
path to a file containing a PID to send SIGHUP to. If omitted, the default
is to signal syslogd. Idea from FreeBSD.
 1.19  05-Oct-1999  ad Allow use of use of ':' to separate user and group names, since elsewhere
'.' is a valid character in user and group names. '.' still works, but
':' takes priority.
 1.18  30-Sep-1999  soren Remove extraneous colons and newlines from perror(3) arguments.
 1.17  19-Dec-1998  christos branches: 1.17.4;
char -> unsigned char and portable printf formats.
 1.16  29-Jul-1998  simonb Remove conditional strdup() compiled if OSF isn't defined, and -DOSF
from the Makefile to guarantee that the private version strdup() isn't
compiled in.
 1.15  06-Jul-1998  mrg - use an array MAXHOSTNAMELEN+1 size to hold hostnames
- ensure hostname from gethostname() is nul-terminated in all cases
- minor KNF
- use MAXHOSTNAMELEN over various other values/defines
- be safe will buffers that hold hostnames
 1.14  02-Apr-1998  kleink Need <time.h> for time() and ctime() prototypes.
 1.13  19-Oct-1997  lukem WARNSify, fix .Nm usage, getopt returns -1 not EOF
 1.12  27-Sep-1996  thorpej RCS id police.
 1.11  27-Sep-1996  thorpej Correct behavior of setting number of saves to 0.
From Kenneth Stailey <kstailey@dol-esa.gov>, PR #2724.
 1.10  07-Jan-1996  pk Fix formatting of timestamp (Mike Grupenhoff; PR#1906).
 1.9  21-Jan-1995  jtc Pass progname to the printf call in usage().
 1.8  06-Jan-1995  jtc Changed so that log entry format used when logfiles are rolled over
matches that of syslogd(8). This is a slightly modified version of
the patch Thorsten Lockert supplied with PR #684.

Changed manpage to reflect the fact that we are using gzip instead
compress.
 1.7  20-Feb-1994  pk Check for reasonable syslog pid before HUPing.
Replace arbitrary constant by MAXPATHLEN.
 1.6  07-Feb-1994  cgd compatibility fixes suggested by Luke Mewburn <lm@rmit.edu.au>
 1.5  10-Aug-1993  mycroft Fix rcsid conflict.
 1.4  01-Aug-1993  mycroft Add RCS identifiers.
 1.3  22-May-1993  cgd add use of "COMPRESS_POSTFIX" define, to determine what postfix
(e.g. ".Z", ".z", etc.) to append to compressed log files.
 1.2  21-May-1993  cgd use the correct (or so john brezak says) copyright.
 1.1  21-May-1993  cgd initial import of this log-rotation program to NetBSD
 1.17.4.1  27-Dec-1999  wrstuden Pull up to last week's -current.
 1.21.4.3  26-Jun-2002  he Pull up revision 1.44 (requested by ad):
Make it actually possible to not compress logs on log rotation.
Fixes PR#16291.
 1.21.4.2  06-Mar-2002  he Pull up revisions 1.22-1.43 (via patch, requested by martti):
Synchronize to current development version. This includes among
other things the ``specific time for periodic trimming'' feature.
 1.21.4.1  09-Oct-2000  ad Apply patch (approved by thorpej):
Wait for gzip to complete.
 1.43.2.3  11-Nov-2004  he Pull up revision 1.47 (requested by mjl in ticket #1746):
Various fixes for when ngen is 0. Fixes PR#26991.
 1.43.2.2  27-Jun-2002  lukem Pull up revision 1.45 (requested by itojun in ticket #383):
don't let newsyslog follow symlink (could be abused to do tricks).
OpenBSD PR 1913.
 1.43.2.1  26-Jun-2002  lukem Pull up revision 1.44 (requested by ad in ticket #381):
Address PR 16291 by Markus W Kilbinger: newsyslog always compresses archived
log files.
 1.49.8.2  22-Jul-2007  christos WARNS=4, pass lint
 1.49.8.1  22-Jul-2007  christos file newsyslog.c was added on branch matt-mips64 on 2007-07-22 17:03:14 +0000
 1.49.4.1  09-Jan-2008  matt sync with HEAD
 1.53.10.2  05-Sep-2009  bouyer Pull up following revision(s) (requested by manu in ticket #925):
usr.bin/newsyslog/newsyslog.c: revision 1.59
Reset ziptype on each line. Failure to do this caused any log file to
be compressed if it was listed after a line using Z or J flag. For
instance, we compressed log2 with the config file below:
/var/log/log1 600 5 100 * Z
/var/log/log2 600 7 100 * -
 1.53.10.1  24-Feb-2009  snj branches: 1.53.10.1.2; 1.53.10.1.4;
Pull up following revision(s) (requested by dogcow in ticket #473):
usr.bin/newsyslog/newsyslog.c: revision 1.57
Fix an embarrassing mistake regarding moving down log files. Reported by
(and fix included in) PR bin/40635 from Jukka Salmi.
 1.53.10.1.4.1  21-Apr-2010  matt sync to netbsd-5
 1.53.10.1.2.1  05-Sep-2009  bouyer Pull up following revision(s) (requested by manu in ticket #925):
usr.bin/newsyslog/newsyslog.c: revision 1.59
Reset ziptype on each line. Failure to do this caused any log file to
be compressed if it was listed after a line using Z or J flag. For
instance, we compressed log2 with the config file below:
/var/log/log1 600 5 100 * Z
/var/log/log2 600 7 100 * -
 1.56.2.1  13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.59.6.2  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.59.6.1  30-Oct-2012  yamt sync with head
 1.60.2.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.

RSS XML Feed