summaryrefslogtreecommitdiffstats
path: root/usr.sbin/newsyslog
Commit message (Collapse)AuthorAgeFilesLines
* Fix interactions between entries for a specific file vs entries forgad2003-03-091-62/+177
| | | | | | | | | 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
* The processing of files given on the command-line will work a little bettergad2003-03-091-1/+1
| | | | | | | if we return the entire worklist, instead of just the last entry. A minor fix to revision 1.57. MFC after: 15 days
* Add a config-file flag of 'U' or 'u' to indicate that the pid-filegad2003-03-081-46/+115
| | | | | | | | | | | | | | | 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
* Prefix all -n (noaction) "unix cmds" with tab, thus making it much easiergad2003-03-071-19/+24
| | | | | | | | to sort out noaction messages from -v (verbose) messages. This also improves a few noaction messages. Obtained from: OpenBSD MFC after: 3 weeks
* Move the -s (nosignal) processing, as newsyslog needs to print out agad2003-03-071-11/+14
| | | | | | | | | | 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
* Add missing 'static' on two routines, so they match their declarations.gad2003-03-031-2/+2
| | | | | | PR: 29363 (a small part of) Submitted by: dinoex MFC after: 3 weeks
* A variety of cosmetic changes, mostly to (slightly) reduce diffs withgad2003-03-031-29/+29
| | | | | | OpenBSD. Except for one added '\n', the object code is not changed. MFC after: 3 weeks
* Collapse two more parameters to dotrim() into the 'ent' parameter that isgad2003-03-031-13/+12
| | | | | | already there. This should not effect anything. MFC after: 3 weeks
* Change to using uid_t and gid_t instead of int. Also change this won'tgad2003-03-031-42/+37
| | | | | | | bother doing a chmod() if neither of these two fields are set. Obtained from: OpenBSD MFC after: 3 weeks
* Fix the interactions between specific log files given on the command line,gad2003-03-031-106/+186
| | | | | | | | | 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)
* Add a command-line option of '-R somename', which indicates that newsysloggad2003-03-021-9/+77
| | | | | | | | | | | | | 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)
* Add a command-line option of '-s', which indicates that newsyslog shouldgad2003-03-021-50/+120
| | | | | | | | | | | | 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
* Fix an error which caused 'free(): error: chunk is already free'gad2003-02-261-0/+3
| | | | | | if an entry in the config file included flag 'G'. MFC after: 3 weeks
* Check the value given for number-of-logs to keep in config-file entries,gad2003-02-241-2/+2
| | | | | | | and error-out if the value is negative (avoiding an infinite loop). PR: bin/30654 (part of it) MFC after: 3 weeks
* 1) Fix so -a honors the -n ("do nothing") option. Before, if the directorygad2003-02-241-4/+16
| | | | | | | | | | 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
* Minor style fix. Add parenthesis around 'return' values.gad2003-02-241-16/+16
| | | | | Reviewed by: md5 MFC after: 3 weeks
* Add the idea of a "default rotate action", which will be used if a file isgad2003-02-241-33/+194
| | | | | | | | | | | 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
* english(4) police.schweikh2002-12-271-2/+2
|
* Make newsyslog(8) print the correct date when the logs are turned over.trhodes2002-12-211-2/+2
| | | | | | PR: 46395 Submitted by: maxim MFC: eventually
* Add a new `W' flag, that when used in conjunction with the `Z' flag or thesobomax2002-12-152-8/+38
| | | | | | | | | | | | | | `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
* Backout unapproved WARNS level change occasionally slipped into previoussobomax2002-12-111-1/+1
| | | | | | commit. Big pointy hat to: sobomax
* - Allow comments to be placed at the end of configuration line.sobomax2002-12-113-5/+21
| | | | | | Sponsored by: Porta Software Ltd Approved by: re MFC after: 2 weeks
* mdoc(7) police: markup fixes.ru2002-11-271-1/+1
| | | | Approved by: re
* Add a new newsyslog.conf flag - 'G', which if set tells newsyslog(8) thatsobomax2002-11-142-1/+29
| | | | | | | | | | 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
* Fix getopt(3) optstring: remove a flag we does not handle.maxim2002-10-161-1/+1
| | | | | | PR: bin/44066 Submitted by: Stefan Farfeleder <e0026813@stud3.tuwien.ac.at> MFC after: 1 week
* The .Nm utilitycharnier2002-07-141-2/+3
|
* Remove the last EOF spaces I missed in rev. 1.43.maxim2002-07-011-2/+2
| | | | MFC after: 1 week
* style(9): sort includes, remove EOL spaces.maxim2002-05-031-6/+6
| | | | MFC after: 1 week
* wait(2) for compress_log() processes to complete before exit.maxim2002-05-031-0/+3
| | | | | | Spotted by: Grigoriy Strokin <grg@isabase.philol.msu.ru> Reviewed by: -current MFC after: 1 month
* Close a very small window during which new (empty) instances of rotated logsheldonh2002-04-101-4/+13
| | | | | | | | | | | | | files are owned by the caller of newsyslog (usually root:wheel) even if alternative ownerships were specified in newsyslog.conf. Note that this is part of a wider problem which is fully addressed in OpenBSD. Anyone with the time and inclination to incorporate the full fix for the wider problem will receive no complaints from me and should feel free to walk all over this delta. PR: bin/36738 MFC after: 1 week
* Produce a different error message for mktime(3) failure than for badcjc2002-04-021-8/+14
| | | | | | newsyslog.conf syntax. PR: bin/36641
* Fix -F with logfiles rotated on time only.roam2002-02-051-1/+1
| | | | | Approved by: silence on -audit MFC after: 1 month
* Fix the type of the NULL arg to execl().obrien2001-11-141-1/+1
|
* WARNS= -> WARNS?=ru2001-09-211-1/+1
|
* jhb says a 10 line change containing casts is more invasive than a 28 lineobrien2001-07-311-14/+14
| | | | change.
* Use the POSIX syntax for chown.obrien2001-07-301-1/+1
| | | | Submmited by: garrett
* Simplify (and hopefully clarify) some date-parsing arithmetic.wollman2001-07-301-1/+1
|
* style(9)obrien2001-07-301-29/+59
|
* WARNS-2'ify.obrien2001-07-302-12/+14
| | | | (this included removing the funny "if (unsigned_var < 0)" test)
* Add the ability to Bzip2 your logs.obrien2001-07-303-7/+63
| | | | | PR: 27901 Submitted by: Anders Nordby <anders@fix.no> (stylistic changes by me)
* Perform a major cleanup of the usr.sbin Makefiles.obrien2001-07-201-1/+0
| | | | | These are not perfectly in agreement with each other style-wise, but they are orders of orders of magnitude more consistent style-wise than before.
* Note the equivalence of certain time formats.wollman2001-07-191-1/+8
|
* Instead of giving an example of rotating logs at the end of the month,dd2001-07-191-2/+3
| | | | | | | | | give an example of how to rotate logs at the beginning of the month. Although they sound the same, since both of them rotate logs at the beginning of the day, the former ended up taking place on, e.g., July 31 00:00 instead of the expected July 31 23:59. This is contraty to POLA. Submitted by: Dan Langille <dan@langille.org>
* Remove whitespace at EOL.dd2001-07-151-17/+17
|
* Fix the type of the NULL arg to execl()brian2001-07-091-1/+1
| | | | Idea from: Theo de Raadt <deraadt@openbsd.org>
* Fix a grammar bogon.dd2001-04-021-1/+1
|
* - Backout botched attempt to introduce MANSECT feature.ru2001-03-261-0/+2
| | | | - MAN[1-9] -> MAN.
* Set the default manual section for usr.sbin/ to 8.ru2001-03-201-2/+0
|
* mdoc(7) police: split punctuation characters + misc fixes.ru2001-02-011-20/+6
|
* - Correct MAXPATHLEN/MAXHOSTNAMELEN usagejedgar2001-01-201-36/+39
| | | | | | | - Check return values of malloc() and strdup() - Replace strcpy()/strcat()/sprintf() usage with strlcpy()/snprintf Reviewed by: -audit
OpenPOWER on IntegriCloud