minix/commands/syslogd
Lionel Sambuc 9152e1c5a7 Upgrading build system to new NetBSD revision
The tested targets are the followgin ones:
 * tools
 * distribution
 * sets
 * release

The remaining NetBSD targets have not been disabled nor tested
*at all*. Try them at your own risk, they may reboot the earth.

For all compliant Makefiles, objects and generated files are put in
MAKEOBJDIR, which means you can now keep objects between two branch
switching. Same for DESTDIR, please refer to build.sh options.

Regarding new or modifications of Makefiles a few things:
 * Read share/mk/bsd.README
 * If you add a subdirectory, add a Makefile in it, and have it called
   by the parent through the SUBDIR variable.
 * Do not add arbitrary inclusion which crosses to another branch of
   the hierarchy; If you can't do without it, put a comment on why.
   If possible, do not use inclusion at all.
 * Use as much as possible the infrastructure, it is here to make
   life easier, do not fight it.

Sets and package are now used to track files.
We have one set called "minix", composed of one package called "minix-sys"
2012-11-15 16:07:29 +01:00
..
CHANGELOG Remove revision IDs from files 2010-11-04 01:13:59 +00:00
Makefile Upgrading build system to new NetBSD revision 2012-11-15 16:07:29 +01:00
README Kick out usyslogd in favour of syslogd Giovanni's syslogd port 2006-04-03 13:07:42 +00:00
README.minix Remove revision IDs from files 2010-11-04 01:13:59 +00:00
syslogd.c generate sys_errlist without holes 2011-07-13 23:42:07 +02:00

This is just syslogd and the test programs now. syslog() is in libc 4.2
syslogd has been changed to use /proc/kmsg for kernel messages. It also
avoids making any terminal it opens its controlling terminal. Otherwise
we have a dodgy race condition between processes connecting to terminals
which can result in the terminal having the wrong group at the wrong time.
The syslog() in libc 4.2 needs changing to use O_NOCTTY on its opens as
well.

Mike Jagdis	Internet: jaggy@purplet.demon.co.uk
		FidoNet:  Mike Jagdis, 2:252/305

---------------------------------------------------------------------------

                           Syslogd and Syslog.o

These are the syslogd and syslog ported from 4.3BSD (that's the new one with
the *very* flexible config file).  

Syslogd is essentially unchanged from the 4.3BSD, with the exception that
*nothing* is ever logged to the console (BAD thing to do on a UNIXpc).  You
can configure it (via /etc/syslog.conf) to log messages in different
logfiles (depending upon the sender's facility code and the priority), log
to users' terminals (same dependancies), and if things get real bad, it can
do a wall (write-all; same dependancies).

Syslog is really only modified in that it uses UDP datagrams because I had
no luck at all using UNIX domain sockets on the 3B1.  See syslog.h for
facility codes and priorities that can be used.


BUGS:
Messages from facilities LOG_KERN, LOG_USER, and LOG_PRT never can be
wall-ed, no matter how high the priority.  I'm still trying to decide if
this is a bug or a feature. :-)


ALSO INCLUDED:

Syslog_test, sendlog (to use from shell scripts) and logger (for use in
shell script also).

NEEDED:

The resolver routines in libresolv.a are not needed, but allow you to log to
hosts not present in /etc/hosts and to accept logging from same.

-----------------------------------------------------------------------

Fixed up UNIX domain socket code, added Linux specific code to read messages
from the kernel.

The #ifdefs are now :-

SYSLOG_INET	listen on a UDP socket (syslogd)
		log via UDP (syslog library call)

SYSLOG_UNIXAF	listen on a UNIX domain socker (syslogd)
		log via UNIX domain (syslogd library)

SYSLOG_KERNEL	fork a second copy to read kernel messages using
		syslog system call.

syslogd should be built with one or more of these flags, libsyslog.a should
be built with SYSLOG_INET or SYSLOG_UNIXAF, SYSLOG_INET is used in preference
to SYSLOG_UNIXAF.

readlog is a program which reads from the kernel and records the messages
it finds in syslogd via the normal library call interface, it can be run
instead of building syslogd with SYSLOG_KERNEL.