6ca40c27 | 29-Jan-2018 |
Antonio Huete Jimenez <tuxillo@quantumachine.net> |
newsyslog - implement 'p' flag
Implement the 'p' flag for newsyslog from NetBSD. This flag results in the first log file for a given file to not be compressed.
While here, don't change file attribu
newsyslog - implement 'p' flag
Implement the 'p' flag for newsyslog from NetBSD. This flag results in the first log file for a given file to not be compressed.
While here, don't change file attributes during a no-op run
Obtained-from: FreeBSD (r327451)
show more ...
|
fb4c3f16 | 29-Jan-2018 |
Antonio Huete Jimenez <tuxillo@quantumachine.net> |
newsyslog - Fix misc issues
When building the command to execute for compression, newsyslog was modifying the generic arguments array instead of its own copy. Meaning on the second file to compress
newsyslog - Fix misc issues
When building the command to execute for compression, newsyslog was modifying the generic arguments array instead of its own copy. Meaning on the second file to compress with the same arguments, the command line was not the one expected. Fix it by creating one copy of the arguments per execution and modifying that copy.
While here, print the command line executed in verbose mode.
show more ...
|
fd38af72 | 29-Jan-2018 |
Antonio Huete Jimenez <tuxillo@quantumachine.net> |
newsyslog - Flexible compression program execution
Allow newsyslog to execute compression commands which have a semantic different than the traditional gzip(1)
This is done to allow to use zstd(1)
newsyslog - Flexible compression program execution
Allow newsyslog to execute compression commands which have a semantic different than the traditional gzip(1)
This is done to allow to use zstd(1) as a compression tool without having to patch it to change its default behavior.
Obtained-from: FreeBSD (r326617)
show more ...
|
e7773cc7 | 29-Jan-2018 |
Antonio Huete Jimenez <tuxillo@quantumachine.net> |
newsyslog - Allow writing RFC5424 compliant rotation message.
This modification adds the capability to newsyslog to write the rotation message in a format that is compliant with RFC5424. This capabi
newsyslog - Allow writing RFC5424 compliant rotation message.
This modification adds the capability to newsyslog to write the rotation message in a format that is compliant with RFC5424. This capability is enabled on a per-log file basis through a new value ("T") in the flags field in newsyslog.conf. This is useful on systems that use the RFC5424 format for log files so that the rotation message format matches that of the other log messages. There has been recent mention of adding an RFC5424 compliant mode to syslogd and at least one alternative system log daemon (rsyslogd) that already has the capability to use that format.
Obtained-from: FreeBSD (r318960)
show more ...
|
4c705cec | 29-Jan-2018 |
Antonio Huete Jimenez <tuxillo@quantumachine.net> |
newsyslog - Add a new Y flag to newsyslog.conf
This makes newsyslog use zstandard to compress log files.
Given Z is already taken for gzip and zstandard compression level stands in between gzip and
newsyslog - Add a new Y flag to newsyslog.conf
This makes newsyslog use zstandard to compress log files.
Given Z is already taken for gzip and zstandard compression level stands in between gzip and xz (which has the X flag) chosing Y sounds ok :)
Obtained-from: FreeBSD (r316981)
show more ...
|
fe742af3 | 29-Jan-2018 |
Antonio Huete Jimenez <tuxillo@quantumachine.net> |
newsyslog - More basename/dirname changes
Properly patch up dirname()/basename() calls to not clobber ent->log.
It turns out that we had a couple of more calls to dirname()/basename() in newsyslog(
newsyslog - More basename/dirname changes
Properly patch up dirname()/basename() calls to not clobber ent->log.
It turns out that we had a couple of more calls to dirname()/basename() in newsyslog(8) that assume the input isn't clobbered. This is bad, because it apparently breaks log rotation now that the new dirname() implementation has been merged.
Fix this by first copying the input and then calling dirname()/basename(). While there, improve the naming of variables in this function a bit.
Obtained-from: FreeBSD (r305651)
show more ...
|
9a304aed | 29-Jan-2018 |
Antonio Huete Jimenez <tuxillo@quantumachine.net> |
newsyslog - Clean up basename/dirname calls
Pull copies of the input pathname string before calling basename() and dirname() to make this comply to POSIX. Free these copies at the end of this functi
newsyslog - Clean up basename/dirname calls
Pull copies of the input pathname string before calling basename() and dirname() to make this comply to POSIX. Free these copies at the end of this function. While there, remove the duplication of the 's' -> 'logfname' string. There is no need for this.
Obtained-from: FreeBSD (r303449)
show more ...
|
c72870e3 | 29-Jan-2018 |
Antonio Huete Jimenez <tuxillo@quantumachine.net> |
newsyslog - Remove unneeded sleep
Eliminate unnecessary sleep(10) when -R and -s are specified
After going through the signal work list, during which do_sigwork() is called and essentially does not
newsyslog - Remove unneeded sleep
Eliminate unnecessary sleep(10) when -R and -s are specified
After going through the signal work list, during which do_sigwork() is called and essentially does nothing because -s and -R were specified on the command line, newsyslog will sleep for 10 seconds as the (verbose) code says: "Pause 10 seconds to allow daemon(s) to close log file(s)".
However, the man page verbiage for -R (and -s) seems quite clear that this sleep() is unnecessary because the daemon was expected to have already closed the log file before calling newsyslog.
Obtained-from: FreeBSD (r301532)
show more ...
|
644cae5e | 29-Jan-2018 |
Antonio Huete Jimenez <tuxillo@quantumachine.net> |
newsyslog - treat 'c' flag in the config as 'C'
When -C was introduced in r114137 the plan was to have -C and -c being used for "create" due to a typo in FreeBSD <= 4.8 a temporary compatibility hac
newsyslog - treat 'c' flag in the config as 'C'
When -C was introduced in r114137 the plan was to have -C and -c being used for "create" due to a typo in FreeBSD <= 4.8 a temporary compatibility hack has been added to make -c being like -G aka GLOB and a warning was issued for the user to be aware of the futur change for -c.
12 years later it is more than time to remove that hack and finish the what was intent in r114137
Obtained-from: FreeBSD (r290226)
show more ...
|