Commit Graph

18 Commits

Author SHA1 Message Date
Brian Somers
8d41a9efa3 Go back to version 1.16 - it was correct the way it was.
Pointed out by:	bde
1998-05-01 19:41:12 +00:00
Brian Somers
e79dc52bbf connect() returns -1 on error - not 0. 1998-05-01 01:16:39 +00:00
Brian Somers
0b3b961e55 We don't need to NUL terminate our sun_path.
Pointed out by: Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
1998-03-06 03:10:49 +00:00
Brian Somers
0d41e7b820 Nul terminate sockaddr_un::sun_path
Suggested by: Theo de Raadt <deraadt@openbsd.org>
1998-03-06 02:12:02 +00:00
Brian Somers
d584948ecd Make SyslogAddr a sockaddr_un rather than a sockaddr.
This wasn't a problem in practice as PATH_LOG and PATH_OLDLOG
are both < sizeof sockaddr::sa_data.
1998-03-05 22:17:59 +00:00
John Polstra
cf49f43912 Add backward compatibility so that static executables built on
modern FreeBSD systems will syslog properly on older systems that
still name the logging socket "/dev/log".  This includes pre-2.2
versions of FreeBSD as well as BSD/OS systems.  If the connect to
"/var/run/log" fails, the function now tries to connect to
"/dev/log" as a fallback.
1997-03-20 16:28:27 +00:00
Peter Wemm
adf6ad9e69 Merge from Lite2:
filesystem include updates, duplicate group suppression, cleanups,
  filesystem whiteout support (unionfs), bidir popen().
1997-03-11 11:52:33 +00:00
Peter Wemm
7e546392b5 Revert $FreeBSD$ to $Id$ 1997-02-22 15:12:41 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Jordan K. Hubbard
51295a4d3e General -Wall warning cleanup, part I.
Submitted-By: Kent Vander Velden <graphix@iastate.edu>
1996-07-12 18:57:58 +00:00
Peter Wemm
7e6ace8561 If the send() to the AF_UNIX socket to the syslogd fails, attempt to
reconnect once using the saved openlog() parameters.

This helps one of the system startup race conditions. If syslogd takes too
long to get going, some daemons can fail the connection and forever log
to the console even though the syslogd is running.  That is ..unfortunate..
1996-03-02 19:56:16 +00:00
Poul-Henning Kamp
8b10240709 Minor cleanup, mostly unused vars and missing #includes. 1995-10-22 14:37:11 +00:00
Peter Wemm
fc370289ab Add $Id$ since this version of the file has diverged from the BSD base a
fair bit.  I forgot to add it when I made the fixes some time ago.
1995-10-21 07:05:01 +00:00
Peter Wemm
11e67a9f2e Fix the problem that I aroused with the last commit..
What was happening, is if syslogd was not running, syslog() would do
a strcat("\r\n") on a non-null-terminated buffer, and write it to the console.

This meant that sometimes extra characters could be written to the console
during boot, depending on the stack contents.

This totally avoids the potential problem by using writev() like the rest
of the does, and avoid modifying the buffer after the trouble we've gone to
to carefully protect it.

This is actually a trivial fix, in spite of the long commit message.. :-)
It only appeared during boot and shutdown with syslogd stopped.
1995-10-05 00:11:15 +00:00
Peter Wemm
7c8e2aa48c Fix security bugs with a "new approach", using stdio's powerful buffer
control hooks.
It is similar to an unrolled multi-part snprintf(), in that a "FILE *" is
attached to a string buffer.  There is also an optimisation for the case
where the syslog format string does not contain %m, which should improve
performance of "informational" logging, like from ftpd.
1995-09-15 13:53:39 +00:00
Andrey A. Chernov
85b3ab5887 National date/time representation in syslog logfiles looks ugly,
change strftime to ctime. Logfiles must have default (english) date/time
representation for access/view from various places.
1995-08-29 13:21:53 +00:00
Andrey A. Chernov
ff17906bc9 Fix bracket error for LogMask
Submitted by: Ruslan Belkin <rus@home2.UA.net>
1995-05-02 17:46:30 +00:00
Rodney W. Grimes
58f0484fa2 BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00