History log of /freebsd/usr.sbin/newsyslog/newsyslog.c (Results 251 – 275 of 347)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# ea690222 04-Jul-2004 Maxim Sobolev <sobomax@FreeBSD.org>

Nothing says that /var/log can't be not a directory but a symbolic link
to a directory. Therefore, use stat(2) instead of lstat(2) to check if
/var/log exists.

MFC after: 7 days


# fbb4e16a 20-Jun-2004 Garance A Drosehn <gad@FreeBSD.org>

Fix the format-string in a call to err(). It was causing a warning if
compiled on 4.x-stable.


# 5ff798ca 19-Jun-2004 Garance A Drosehn <gad@FreeBSD.org>

Fix the check for a "duplicate filename to compress", so that we're checking
the *filename* and not the pid_file(!). Stupid brain-fault on my part.
This could cause a segfault under -neworder if ne

Fix the check for a "duplicate filename to compress", so that we're checking
the *filename* and not the pid_file(!). Stupid brain-fault on my part.
This could cause a segfault under -neworder if newsyslog had to rotate
multiple files, and later ones had specifed the 'N' flag.

Bug first reported by: le
MFC after: 3 days

show more ...


# c8fd7c32 12-Jun-2004 Garance A Drosehn <gad@FreeBSD.org>

Switch to using the "neworder" for rotating log files, by default. The
main advantage of this is that daemon's are only signalled once per run,
instead of once for each file that is rotated.

MFC af

Switch to using the "neworder" for rotating log files, by default. The
main advantage of this is that daemon's are only signalled once per run,
instead of once for each file that is rotated.

MFC after: 2 weeks

show more ...


# 4559c181 07-Jun-2004 Garance A Drosehn <gad@FreeBSD.org>

Add an "oldorder" option, so that when the default changes to "neworder",
people have a way to drop back to the previous logic.

MFC after: 13 days


# aa6904eb 07-Jun-2004 Garance A Drosehn <gad@FreeBSD.org>

In "neworder" processing, reduce the delay between signals to separate
processes, and balance that by adding a 10-second delay after all the
processes have been signaled. Also improvement a few mess

In "neworder" processing, reduce the delay between signals to separate
processes, and balance that by adding a 10-second delay after all the
processes have been signaled. Also improvement a few messages printed
with `-n' or `-v' processing (mostly signal-related messages).

MFC after: 13 days

show more ...


# 7f5b34d7 07-Jun-2004 Garance A Drosehn <gad@FreeBSD.org>

Major re-ordering of the steps that newsyslog will use when processing
files to rotate. The new order will first rotate all files that need
to be rotated, and then send a single signal to each proce

Major re-ordering of the steps that newsyslog will use when processing
files to rotate. The new order will first rotate all files that need
to be rotated, and then send a single signal to each process which
needs to be signaled, and finally it will compress all the files which
were rotated.

This means daemons will be signaled once per run of newsyslog, instead
of once per file rotated. Also, files will be compressed in order of
file-size (smallest to largest). Also, it waits for each file to be
completely compressed before starting the next one (effectively as if
the 'w' flag is specified for all entries in newsyslog.conf). This
avoids the situation of having 10 gzip's going at the same time (each
with a log.0 and a log.0.gz file active), and it also means that file
attributes can be reliably set on files after they are compressed.

NOTE: This commit does define NEWORDER (which you could get rid of if
you really don't trust this), but it does not flip the "-D neworder"
switch. So, at the moment none of these changes happen unless you
request them (perhaps by adding '<debug> neworder' in newsyslog.conf).

PR: bin/25070 inspired some parts of this
Submitted by: parts from bin/25070 done by Helge Oldach
MFC after: 14 days

show more ...


# 9d780a43 07-Jun-2004 Garance A Drosehn <gad@FreeBSD.org>

A variety of minor changes. Allow users to set a debugging option via
the newsyslog.conf file. Rename one size-related variable, and move
another one from the stack into conf_entry. Add a routine

A variety of minor changes. Allow users to set a debugging option via
the newsyslog.conf file. Rename one size-related variable, and move
another one from the stack into conf_entry. Add a routine to change
file-attributes (chown, chmod, chflags), instead of having several
places doing the same sequence of system-calls. A few cosmetic/style
changes.

These should not effect any users. Most of these probably look
pointless, but they are the "insignificant parts" of a much larger
update that I'll be committing soon. Doing these as a separate update
should make that update easier to read.

MFC after: 14 days

show more ...


# d7dc92dc 04-Jun-2004 Garance A Drosehn <gad@FreeBSD.org>

Style-istic fix to a number of #define's that were not followed by a tab...

MFC after: 16 days


# 55bf17e9 04-Jun-2004 Garance A Drosehn <gad@FreeBSD.org>

Add a 'D' flag that can be specified on entries in newsyslog.conf.
If specified, the matching log files will have the NODUMP flag set
on them after they are created.

Submitted by: Sean Eric Fagan
MF

Add a 'D' flag that can be specified on entries in newsyslog.conf.
If specified, the matching log files will have the NODUMP flag set
on them after they are created.

Submitted by: Sean Eric Fagan
MFC after: 16 days

show more ...


# b2cd4263 04-Jun-2004 Garance A Drosehn <gad@FreeBSD.org>

Change standard processing to use the newer createlog() routine
that had been written some months ago for other processing. This
should get rid of a few subtle situations where an existing log
file

Change standard processing to use the newer createlog() routine
that had been written some months ago for other processing. This
should get rid of a few subtle situations where an existing log
file would not exist (for a short time) while it is being rotated.

MFC after: 16 days

show more ...


# efdb85c8 02-Jun-2004 Garance A Drosehn <gad@FreeBSD.org>

Improved versions of the is*ch() and tolowerch() macros that I like to use.


# f1da5601 02-Jun-2004 Garance A Drosehn <gad@FreeBSD.org>

When rotating some "blah.log" file, make sure that a chmod and
(if requested) a chown is done on the "blah.log.0" file.

PR: bin/67137
Submitted by: jeh
MFC after: 10 days


Revision tags: release/4.10.0_cvs, release/4.10.0
# 66e338b3 04-Apr-2004 Philippe Charnier <charnier@FreeBSD.org>

Do not :-terminate err(3) string, one will be added anyway.


Revision tags: release/5.2.1_cvs, release/5.2.1, release/5.2.0_cvs, release/5.2.0, release/4.9.0_cvs, release/4.9.0
# 6a1485e2 23-Sep-2003 Garance A Drosehn <gad@FreeBSD.org>

Restructure the time processing routines, mainly to fix up the
"will trim at" message printed when the user requests '-v'. The
previous code would often print the wrong time, such as:
On Sept 22, ru

Restructure the time processing routines, mainly to fix up the
"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

show more ...


# 2f8d7c56 12-Sep-2003 Garance A Drosehn <gad@FreeBSD.org>

Move the parse8601 and parseDWM routines into a new ptime.c file. The
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_

Move the parse8601 and parseDWM routines into a new ptime.c file. The
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

show more ...


# 3c0f0ccc 09-Sep-2003 Garance A Drosehn <gad@FreeBSD.org>

Switch dotrim() to take advantage of the 'struct conf_entry' that
is already passed in, instead of having the caller copy values from
that struct into additional parameters.

MFC after: 22 days


# 1005e972 09-Sep-2003 Garance A Drosehn <gad@FreeBSD.org>

Reduce the annoying compiler warnings that pop up when compiling with
gcc 3.3.x and -Wshadow. Just renames 'log' variables to be 'logname'.

MFC after: 22 days


# 1f566014 09-Sep-2003 Garance A Drosehn <gad@FreeBSD.org>

Correct the comment about which timezone-change loses an hour...

MFC after: 23 days


# 9b8311ce 09-Sep-2003 Garance A Drosehn <gad@FreeBSD.org>

Add a '-D <something>' command line arg, which can be used to set
debugging options. Initial option is '-D TN=<time>', which can be
used to see how newsyslog would work if run at the specified time.

Add a '-D <something>' command line arg, which can be used to set
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

show more ...


# c31cdd1b 09-Sep-2003 Garance A Drosehn <gad@FreeBSD.org>

Use strtol() instead of strtoul() in parse8601, so we can detect
negative values. Mainly done to sync this routine with OpenBSD.

Obtained from: OpenBSD
MFC after: 23 days


# 5303adbf 09-Sep-2003 Garance A Drosehn <gad@FreeBSD.org>

Fix typo in the previous commit. Was checking wrong variable...

MFC after: 23 days


# 32734b8a 09-Sep-2003 Garance A Drosehn <gad@FreeBSD.org>

Change parse8601 and parseDWM so they return an alternate error value
for invalid times, and have the caller print the error message.

MFC after: 23 days


# ab766258 09-Sep-2003 Garance A Drosehn <gad@FreeBSD.org>

Cosmetic change to move parse8601 right next to parseDWM. No code
is changed. (that will come in later updates).

MFC after: 23 days


# c877fb51 19-Aug-2003 Garance A Drosehn <gad@FreeBSD.org>

When checking the 'user:group' field in newsyslog.conf, freebsd's source
was mistakenly calling the standard isnumber() function to find out if
the given 'user' or 'group' were all numeric. This mea

When checking the 'user:group' field in newsyslog.conf, freebsd's source
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

show more ...


1...<<11121314