| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
other than 'initial revision' thus I did not request a repocopy.
Requested by: ru, gad
|
|
|
|
| |
Add an Xref to newsyslog.conf.5 and bzip2.1.
|
|
|
|
| |
MFC after: 14 days
|
|
|
|
|
|
|
|
|
|
| |
"will trim at" message printed when the user requests '-v'. The
previous code would often print the wrong time, such as:
On Sept 22, run: newsyslog -nv /var/log/wtmp
And see: will trim at Mon Sep 1 05:00:00 2003
correct msg: will trim at Wed Oct 1 05:00:00 2003
MFC after: 20 days
|
|
|
|
|
|
|
|
| |
would only match a leap year every 400 years. The parseDWM code first
showed up in April 2000, so the first time this bug would cause any
confusion is in Feb 2004.
MFC after: 18 days
|
|
|
|
|
|
|
| |
only code-change is to add a "next_time" parameter to both routines (and
that is not used yet). A later update will make "next_time" more useful.
MFC after: 20 days
|
|
|
|
|
|
|
| |
is already passed in, instead of having the caller copy values from
that struct into additional parameters.
MFC after: 22 days
|
|
|
|
|
|
| |
gcc 3.3.x and -Wshadow. Just renames 'log' variables to be 'logname'.
MFC after: 22 days
|
|
|
|
| |
MFC after: 23 days
|
|
|
|
|
|
|
|
| |
debugging options. Initial option is '-D TN=<time>', which can be
used to see how newsyslog would work if run at the specified time.
(time format is ISO 8601, since that is already supported).
MFC after: 23 days
|
|
|
|
|
|
|
| |
negative values. Mainly done to sync this routine with OpenBSD.
Obtained from: OpenBSD
MFC after: 23 days
|
|
|
|
| |
MFC after: 23 days
|
|
|
|
|
|
| |
for invalid times, and have the caller print the error message.
MFC after: 23 days
|
|
|
|
|
|
| |
is changed. (that will come in later updates).
MFC after: 23 days
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
was mistakenly calling the standard isnumber() function to find out if
the given 'user' or 'group' were all numeric. This meant that only the
first character of the fields were actually checked, so a username of
(say) '3com' would look like a number, and thus get mapped to uid=3 (bin)
instead of username=3com.
This bug was introduced back in freebsd's v1.1. That initial import
almost matches netbsd's v1.9, except that an internal isnumber()
routine was removed in favor of the standard library version. The thing
is, that internal routine was checking the entire string, and not just
the first digit. In OpenBSD, isnumber() was eventually renamed to
isnumberstr() to make the distinction more obvious, and I'm going to
follow that lead.
I believe this also happens to remove the last references to isnumber()
in the entire freebsd base system.
Obtained from: OpenBSD, by a long circuitous route
MFC after: 5 days
|
|
|
|
|
|
|
| |
the 'C' flag on an entry that also specifies 'user:group' info.
Submitted by: Riccardo Torrini <riccardo@torrini.org> in -current
MFC after: 4 days
|
|
|
|
|
|
|
|
|
|
| |
rotated and then compressed with bzip2 instead of gzip. Otherwise,
any file which had a time-interval specified for 'when' and also
specified the 'J' flag would be rotated every time newsyslog was run.
(this is a quick-fix, trying to beat the code-freeze for 5.1-release)
PR: bin/51519
MFC after: 1 week
|
|
|
|
|
|
| |
a warning message if they switch the values for 'size' and 'when'.
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
|
|
|
| |
config file. If the -C option is specified once, then newsyslog will create
any entries which specify the 'C' option. If -C is given twice, then
newsyslog will create all missing log files. Some of this code comes
from NetBSD, although this implementation does not exactly match theirs.
Reviewed by: freebsd-arch
MFC after: 10 days
|
|
|
|
|
|
| |
as revision 1.64 of newsyslog.c. I plan to MFC these changes next week.
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
| |
the 'N' flag. These were coded in March as revisions 1.55 and 1.56
of newsyslog.c. I intend to MFC all the matching changes next week.
This also reorganizes the description of the 'flags' field to give
list of the valid flags, instead of a long paragraph explaining
each of the possible values.
Obtained from: NetBSD (in spirit at least, for -s and N)
MFC after: 1 week
|
|
|
|
|
|
|
| |
revision 1.50 of newsyslog.c , back in February. I intend to MFC
those changes soon.
MFC after: 4 days
|
|
|
|
|
|
|
|
|
| |
a filename pattern, and also wrt filenames given on the command line.
Now if a file is listed as a specific entry, it will not *also* be
processed by an entry specifying a pattern. And filename-patterns
will now only match existing files (ignoring directories, etc).
MFC after: 3 weeks
|
|
|
|
|
|
|
| |
if we return the entire worklist, instead of just the last entry. A minor
fix to revision 1.57.
MFC after: 15 days
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
will contain the pid for a process group. This means the file must
contain a negative value (as would be needed in the 'kill' commmand).
I still need to write man-page update before MFC-ing.
This started by rewriting the get_pid() routine. Later I looked at
what OpenBSD has, and included a few ideas from their send_signal()
routine. So, parts of this change are from OpenBSD, even though
OpenBSD does not actually have a 'U' flag.
PR: bin/28435
Reviewed by: no objections on freebsd-arch
MFC after: 3 weeks
|
|
|
|
|
|
|
|
| |
to sort out noaction messages from -v (verbose) messages. This also
improves a few noaction messages.
Obtained from: OpenBSD
MFC after: 3 weeks
|
|
|
|
|
|
|
|
|
|
| |
warning message if -s is specified and it rotates a file that expects
to be compressed. This warning message is not printed if -R is also
specified, because we assume a -sR request is coming from the process
which would have been signaled, and that it has already released the
logfile.
Indirectly noticed by: sheldonh
|
|
|
|
|
|
| |
PR: 29363 (a small part of)
Submitted by: dinoex
MFC after: 3 weeks
|
|
|
|
|
|
| |
OpenBSD. Except for one added '\n', the object code is not changed.
MFC after: 3 weeks
|
|
|
|
|
|
| |
already there. This should not effect anything.
MFC after: 3 weeks
|
|
|
|
|
|
|
| |
bother doing a chmod() if neither of these two fields are set.
Obtained from: OpenBSD
MFC after: 3 weeks
|
|
|
|
|
|
|
|
|
| |
and config-file entries which specify a filename-pattern (glob). It is
still not perfectly-right, but at least it isn't completely-wrong.
Reviewed by: no objections on freebsd-arch
MFC after: 3 weeks
MFC addendum: (or after the code-freeze of 4.x is lifted)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
should rotate all files given on the command, even if they don't seem to
need to be rotated. This would be used by some other command that decides
the given log file(s) should be rotated, but wants the "how" of that rotation
to be determined by entries to newsyslog. Wes expects to change syslogd to
take advantage of this. Man page will be updated after we're sure this is
all working the way we want it to.
Reviewed by: no objections on freebsd-arch
MFC after: 3 weeks
MFC addendum: (or after the code-freeze of 4.x is lifted)
|
|
|
|
|
|
|
|
|
|
|
|
| |
not send a signal to any processes. Also add a config-file flag of 'N' or
'n', which indicates that the given logfile has no process which needs a
signal when it is rotated. Both of these are based on changes NetBSD
has made, although the implementation is somewhat different.
PR: bin/36553 (2nd half)
Reviewed by: no objections on freebsd-arch
Obtained from: NetBSD (in spirit, at least)
MFC after: 3 weeks
|
|
|
|
|
|
| |
if an entry in the config file included flag 'G'.
MFC after: 3 weeks
|
|
|
|
|
|
|
| |
and error-out if the value is negative (avoiding an infinite loop).
PR: bin/30654 (part of it)
MFC after: 3 weeks
|
|
|
|
|
|
|
|
|
|
| |
given for -a did not exist, then newsyslog would always try to create
it, even if -n was specified.
2) When -a processing *does* create the directory, have it check the result
from mkdir(), and immediately error-out if that failed.
PR: bin/46974
MFC after: 3 weeks
|
|
|
|
|
| |
Reviewed by: md5
MFC after: 3 weeks
|
|
|
|
|
|
|
|
|
|
|
| |
specified at runtime, but that filename is not listed in the newsyslog.conf
file. This default-action can be changed by having a line in newsyslog.conf
with the filename of "<default>". Before this change, the program would
quietly ignore the given file. An update to the man page will be written
after I finish some other updates to newsyslog.c.
Reviewed by: no objections from freebsd-arch
MFC after: 3 weeks
|
| |
|
|
|
|
|
|
| |
PR: 46395
Submitted by: maxim
MFC: eventually
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`J' flag means that newsyslog should wait for previously started compression
jobs to complete before starting a new one for this entry. When it is used
along with the `G' flag, in the case when several logfiles match the pattern
and should be compressed, the newsyslog will compress logs one by one,
ensuring that only one compression job is running at a time.
This prevents newsyslog(8) from overloading system by starting several
compression jobs on big files simultaneously.
Sponsored by: Porta Software Ltd
MFC after: 2 weeks
|
|
|
|
|
|
| |
commit.
Big pointy hat to: sobomax
|
|
|
|
|
|
| |
Sponsored by: Porta Software Ltd
Approved by: re
MFC after: 2 weeks
|
|
|
|
| |
Approved by: re
|
|
|
|
|
|
|
|
|
|
| |
the specified filename of the log to be rotated is in fact shell glob
pattern. In this case, all files matching this pattern will be rotated
using the same options. Useful in the case when there is no pre-defined
name for the logfiles (e.g. xtradius, samba etc).
Sponsored by: PortaOne Software Ltd
MFC after: 2 weeks
|
|
|
|
|
|
| |
PR: bin/44066
Submitted by: Stefan Farfeleder <e0026813@stud3.tuwien.ac.at>
MFC after: 1 week
|
| |
|
|
|
|
| |
MFC after: 1 week
|