syslogd(8): Fix klog may be broken into multiple incomplete linesFix readklog() to not emit partial lines by changing it to use a staticbuffer for reading log lines from /dev/klog. Thus we can ma
syslogd(8): Fix klog may be broken into multiple incomplete linesFix readklog() to not emit partial lines by changing it to use a staticbuffer for reading log lines from /dev/klog. Thus we can make itonly emit the line for printing if there is a complete line.This fixes the issue that a kernel log line may be broken into multipleincomplete lines that are written into log file by syslogd(8),especially when the system is under load.Patch-by: Matt Dillon
show more ...
Replace local array size calculations with NELEM().
build - prepare for higher optimization levels* Add NO_STRICT_ALIASING, NO_STRICT_OVERFLOW, and NO_WARRAY_BOUNDS make variables as-needed.
Remove two casts of NULL.
syslogd(8): Get rid of an unnecessary goto and label, add braces too.
syslogd: Fix indent.
Remove some casts of NULL to pointer types which had accumulated.They were brought back from FreeBSD with various updates.
libutil: Various updates from FreeBSD, esp. pid_* functionsIt appears that libutil.so is another Frankenstein monster where halfof it came from FreeBSD and later it was updated with NetBSD functio
libutil: Various updates from FreeBSD, esp. pid_* functionsIt appears that libutil.so is another Frankenstein monster where halfof it came from FreeBSD and later it was updated with NetBSD functions.Like libm, this causes problems with syncing later.In order to update the daemon program, the set of pidfile_* functionshad to be brought in from FreeBSD. While doing that, I synced withFreeBSD as much as possible. The expand number function was addedas well as a dedicated pw_util man page.Specifically ignored were FreeBSD functionality involving kinfo and kld.The login functions are essentially incompatible as the FreeBSD onesrequire syscntls, so I left the NetBSD versions alone. The varioushumanize functions that only exist on DragonFly were also left untouched.Collateral damage included: sbin/devd/devd.[ch][ch] (partial sync) usr.sbin/authpf/authpf.c (partial sync) usr.sbin/apmd/apmd.c usr.sbin/battd/battd.c usr.sbin/bthcid/bthcid.c usr.sbin/pflogd/pflogd.c usr.sbin/rwhod/rwhod.c usr.sbin/syslogd/ (full sync) usr.sbin/sysvipcd/sysvipcd.c
Correct BSD License clause numbering from 1-2-4 to 1-2-3.Apparently everyone's doing it:http://svnweb.freebsd.org/base?view=revision&revision=251069Submitted-by: "Eitan Adler" <lists at eitanadl
Correct BSD License clause numbering from 1-2-4 to 1-2-3.Apparently everyone's doing it:http://svnweb.freebsd.org/base?view=revision&revision=251069Submitted-by: "Eitan Adler" <lists at eitanadler.com>
Fix some typos in the manpages.
utmpx - Bring in utmpx,wtmpx and lastlogx support* This commit introduces the necessary support for utmpx, wtmpx and lastlogx, as well as updating many base utils to work with these while mostl
utmpx - Bring in utmpx,wtmpx and lastlogx support* This commit introduces the necessary support for utmpx, wtmpx and lastlogx, as well as updating many base utils to work with these while mostly maintaining compatibility with the old utmp, wtmp and lastlog.* The new last(1) supports wtmpx but defaults to wtmp as not all wtmp writers have been updated for wtmpx.* All utmp readers support both utmp and utmpx now.* lastlogin (the only lastlog reader) supports both lastlog and lastlogx.* The utils who(1) and finger have been almost directly replaced by their NetBSD equivalent. In case of who(1) the only custom modification is the behaviour of '-b' to be as it has always been.* Partially-Obtained-from: NetBSD
wall(1)/syslogd(8): Raise WARNS to 6 and fix warnings.
Replace all casts of NULL to something with NULL.
Sync syslogd with FreBSD:* Add a flag, -T, that tells syslogd to always replace the timestamp onmessages from the network. This option lets us replace timestamps thatare correctly formatted but
Sync syslogd with FreBSD:* Add a flag, -T, that tells syslogd to always replace the timestamp onmessages from the network. This option lets us replace timestamps thatare correctly formatted but wrong.* Allow comment to be placed at the end of a configuration line.* Add a -8 switch to syslogd to prevent it from mangling 8-bit data.* Open ctty in non-blocking mode to avoid hangs during open and close.* Handle "*" as a priority properly.* Dynamically determine length vs. hardcoding it.* Free the previous message buffer (f_prevline) only after logging allthe messages and just before the process exit. Also check f_prevline forNULL before using it.* Add the ability to log to an arbitrary udp port as well as thestandard syslog port.* Currently, if writing out a log entry fails, we unlink that log entryfrom our internal list of logfiles. So if writev(2) fails for potentiallytransient errors like ENOSPC, syslogd requires a restart, even if thefilesystem has purged. This change allows syslogd to ignore ENOSPCspace errors, so that when the filesystem is cleaned up, syslogd willautomatically start logging again without requiring the reset.This makes syslogd(8) a bit more reliable.* Add -C option which tells syslogd(8) to create log files if they don'texist.* Add cases for ENOBUFS and ENETDOWN. We need to make sure that wecatch all transient errors. This fixes situations where transienterror conditions such as network interfaces losing carrier signalsor the system running out of mbufs would result in the permanentremoval of forwarding syslog messages.* Add -S option which allows to change the pathname of the privilegedsocket /var/run/logpriv.* Check that supplied facility is not bigger than LOG_NFACILITIES.* Allow ':' and '%' in hostname specifications so that we can specifyIPv6 addresses and scope IDs.* Protect against local flooder of /var/run/log. Do not loop forever insyslog(3) if we are a priveleged program (sshd, su, etc.). - Make syslogd open an additional socket /var/run/logpriv, with 0600 permissions. - In libc, try to use this socket. - Do not loop forever if we are using this socket* Use stailqueue for sockets instead of socket buffer. Thus removelimit for 20 sockets.* Add possibility to specify file mode for sockets created with '-l'.* Check that socket name in '-l' is absolute.* Make syslog(3) thread safe.
It's syslogd which calls fsync(), not syslog.conf.Noticed-by: hasso
Explicitly set a large receive buffer for datagram sockets to give sysloga better chance at catching large message bursts from today's high-volumeservices.
Use .Ux for UNIX.
Fix typo.
Use .Xr for manpage references.
Fix section ordering.
- Uniformly use .In for header file references.- Fix numerous wrong directory names.
Sweep-fix man page section order to match mdoc(7), part 5/5.Note: I haven't touched the few man pages that are still using the old man(7) macros. They will be converted to mdoc later.
Silence groff warnings
Clean (void) casts from usr.sbin
Bring in Jeff Wheelhouse's CLOG / circular log file support for syslogd,With some formatting changes.Side note: CLOG's use of mmap within syslogd is very dangerous and couldlead to syslogd seg-fa
Bring in Jeff Wheelhouse's CLOG / circular log file support for syslogd,With some formatting changes.Side note: CLOG's use of mmap within syslogd is very dangerous and couldlead to syslogd seg-faulting out, especially since the control structureappears to reside at the end of the physical log file. Users of circularlog files must take care.Requested-by: The MOB!
12