SYSKLOGD(1)

NAME
sysklogd — Linux system logging utilities.

DESCRIPTION
sysklogd provides two system utilities which provide support for system logging and kernel message trapping. Support of both inetd and unix domain sockets enables this utility package to support both local and remote logging. System logging is provided by a version of syslogd derived from the stock BSD sources. Support for kernel logging is provided by the klogd utility which allows kernel logging to be conducted in either a standlaone fashion or as a client of syslogd. While the syslogd sources have been heavily modified a couple of notes are in order. First of all there has been a systematic attempt to insure that syslogd follows as its default, standard BSD behavior. The second important concept to note is that this version of syslogd interacts transparently with the version of syslog found in the standard libraries. If a binary linked to the standard shared libraries fails to function correctly we would like an example of the anomalous behavior.

CONFIGURATION FILE SYNTAX DIFFERENCES
Syslogd uses a slightly different syntax for its configuration file than the original BSD sources. Originally all messages of a specific priority and above were forwarded to the log file.

    For example the following line caused ALL output from daemon the daemon facilities to go into /usr/adm/daemons:

    	# Sample syslog.conf
    	daemon.debug			/usr/adm/daemons

Under the new scheme this behavior remains the same. The difference is the addition of two new wildcard specifiers the asterick (*) and the equals sign (=). The * specifies that all messages for the specified facility are to be directed to the destination. Note that this behavior is degenerate with specifying a priority level of debug. Users have indicated that the asterick notation is more intuitive. The (=) wildcard is used to restrict logging to the specified priority class. This allows, for example, routing only debug messages to a particular logging source.

    For example the following line in syslog.conf would direct debug messages from all sources to the /usr/adm/debug file.

    	# Sample syslog.conf
    	daemon.=debug			/usr/adm/debug

This may take some acclimization for those individuals used to the pure BSD behavior but testers have indicated that this syntax is somewhat more flexible than the BSD behavior. Note that these changes should not affect standard syslog.conf files. You must specifically modify the configuration files to obtain the enhanced behavior.

SUPPORT FOR REMOTE LOGGING
These modifications provide network support to the syslogd facility. Network support means that messages can be forwarded from one node running syslogd to another node running syslogd where they will be actually logged to a disk file. The strategy is to have syslogd listen on a unix domain socket for locally generated log messages. This behavior will allow syslogd to interoperate with the syslog found in the standard C library. At the same time syslogd listens on the standard syslog port for messages forwarded from other hosts. To have this work correctly the services files (typically found in /usr/etc/inet) must have the following entry:

    	syslog          514/udp

To cause messages to be forwarded to another host replace the normal file line in the syslog.conf file with the name of the host to which the messages is to be sent prepended with an @.

    For example, to forward ALL messages to a remote host use the following syslog.conf entry:

    	# Sample syslogd configuration file to
    	# messages to a remote host forward all.
    	*.*			@hostname
    To forward all kernel messages to a remote host the configuration file would be as follows:

    	# Sample configuration file to forward all kernel
    	# messages to a remote host.
    	kern.*		@hostname

OUTPUT TO NAMED PIPES (FIFO's)
This version of syslogd has support for logging output to named pipes (fifo's). A fifo or named pipe can be used as a destination for log messages by prepending a | to the name of the file. This is handy for debugging. Note that the fifo must be created with the mkfifo command before syslogd is started.

    The following configuration file routes debug messages from the kernel to a fifo:

    	# Sample configuration to route kernel debugging
    	# messages ONLY to /usr/adm/debug which is a
    	# named pipe.
    	kern.=debug			|/usr/adm/debug

INSTALLATION CONCERNS
There is probably one important consideration when installing this version of syslogd. This version of syslogd is dependent on proper formatting of messages by the syslog function. The functioning of the syslog function in the shared libraries changed somewhere in the region of libc.so.4.[2-4].n. The specific change was to null-terminate the message before transmitting it to the /dev/log socket. Proper functioning of this version of syslogd is dependent on null-termination of the message. This problem will typically manifest itself if old statically linked binaries are being used on the system. Binaries using old versions of the syslog function will cause empty lines to be logged followed by the message with the first character in the message removed. Relinking these binaries to newer versions of the shared libraries will correct this problem.

SECURITY THREATS
There is the potential for the syslogd daemon to be used as a conduit for a denial of service attack. Thanks go to John Morrison (jmorriso@rflab.ee.ubc.ca) for alerting me to this potential. A rogue program(mer) could very easily flood the syslogd daemon with syslog messages resulting in the log files consuming all the remaining space on the filesystem. Activating logging over the inet domain sockets will of course expose a system to risks outside of programs or individuals on the local machine. Version 1.2 of the utility set will address this problem. In the meantime there are a number of methods of protecting a machine:

1.  Logging can be directed to an isolated or non-root filesystem which, if filled, will not impair the machine.

2.  The ext2 filesystem can be used which can be configured to limit a certain percentage of a filesystem to usage by root only. NOTE that this will require syslogd to be run as a non-root process. ALSO NOTE that this will prevent usage of remote logging since syslogd will be unable to bind to the 514/UDP socket.

3.  Disabling inet domain sockets will limit risk to the local machine.

4.) Use step 3 and if the problem persists and is not secondary to a rogue program/daemon get a 3.5 ft (approx. 1 meter) length of sucker rod* and have a chat with the user in question. sucker rod def. — 3/4, 7/8 or 1in. hardened steel rod, male threaded on each end. Primary use in the oil industry in Western North Dakota and other locations to pump 'suck' oil from oil wells. Secondary uses are for the construction of cattle feed lots and for dealing with the occassional recalcitrant or belligerant individual.

FILES
/etc/syslog.conf

BUGS
Primarily security concerns to be addressed in Version 1.2

SEE ALSO
klogd(1)

COLLABORATORS
Dr. Greg Wettstein (greg%wind.uucp@plains.nodak.edu)
Enjellic Systems Development
Oncology Research Division Computing Facility
Roger Maris Cancer Center
Fargo, ND
greg%wind.uucp@plains.nodak.edu
Stephen Tweedie
Department of Computer Science
Edinburgh University, Scotland
Juha Virtanen
jiivee@hut.fi
Shane Alderton
shane@scs.apana.org.au