Commit Graph

74 Commits

Author SHA1 Message Date
Joey Schulze
0bb8aa7194 Adjust indention 2008-05-11 17:05:24 +00:00
Joey Schulze
91b3e07d6e Correct logic: flush log files independed of MARK 2008-05-11 17:04:18 +00:00
Joey Schulze
7bded835a2 Correct calculation 2008-05-11 17:03:39 +00:00
Joey Schulze
e7141b5d5f Added missing changelog entry 2008-05-08 19:43:09 +00:00
Joey Schulze
94e0cb4f54 Code reorganisation: make sure that the service name is only queried
when it is needed, i.e. when we are sending to or receiving from the
network
2008-05-07 21:00:39 +00:00
Joey Schulze
c5f9d2cd50 Thomas Jarosch: Move hostname setting code from main() into init() 2007-11-10 19:01:48 +00:00
Joey Schulze
be3066caa3 Improved sleep/alarm/mark implementation by
Alan Jenkins <alan-jenkins@tuffmail.co.uk>
2007-10-08 15:24:06 +00:00
Joey Schulze
7097243191 Adjusted indention 2007-10-08 09:43:48 +00:00
Joey Schulze
2a2ab0cb77 Prevent pipes from becoming the controlling tty 2007-07-04 19:04:02 +00:00
Joey Schulze
c972380fef Reverted patch by Andreas Barth since it caused problems with opening the pipe 2007-07-04 19:00:09 +00:00
Joey Schulze
2d16b292d4 Correction to build tsyslogd again 2007-05-30 15:43:45 +00:00
Joey Schulze
a62825213d Untypo 2007-05-30 10:26:51 +00:00
Joey Schulze
a9e818414a Notify the waiting parent process if the client dies to it doesn't
wait the entire five minutes.
2007-05-28 17:45:43 +00:00
Joey Schulze
f6b24257f5 Patch by Andreas Barth: Prevent pipes from becoming the controlling tty 2007-05-28 17:02:06 +00:00
Joey Schulze
c678f47f8b Use ssize_t and reduced code where appropriate 2007-05-26 18:44:42 +00:00
Joey Schulze
244eb7aa6e Log message 2007-05-26 10:45:55 +00:00
Joey Schulze
13bf88e488 Log message 2007-05-26 10:30:46 +00:00
Joey Schulze
b9e5b7b942 Properly accompany the MARK message with the facility 2007-05-26 10:22:34 +00:00
Joey Schulze
beecd897e4 Only try to gather the local domain name when messages are received
from the network, it's not needed otherwise.
2007-05-26 08:05:05 +00:00
Joey Schulze
3268f928dc Removed test to detect control characters > 0x20 as this prevented
characters encoded in UTF-8 to be properly passed through.  This
prevented a security-related patch by Solar Designer (1.29).

References:
  Debian Bug#315605 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=315605>
  RedHat Bug#89292  <https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=89292>
2007-05-26 07:11:45 +00:00
Joey Schulze
64b5a191e5 Reset the signal handler in the child 2007-05-25 18:47:21 +00:00
Joey Schulze
f1c2aba323 Formatting 2007-05-24 14:07:10 +00:00
Joey Schulze
c5d4b37a6b Remove SO_BSDCOMPAT since it was only support by Linux 2.0 and 2.2,
ignored in 2.4 and emitted a warning in 2.6
2007-05-24 14:04:22 +00:00
Joey Schulze
031b077eb8 Patch by Mike Frysinger: use socklen_t where appropriate 2007-05-24 13:56:04 +00:00
Joey Schulze
8ead571ba1 When writing log files ignore errors caused by filled up disks so that
the log continues to be written as soon as space becomes available again.
2007-05-24 13:28:18 +00:00
Joey Schulze
62ec1253ee Only play with the network when the syslog port can be determined.
Ignore networking otherwise, but continue working. (Debian Bug#226611)
2007-05-21 11:00:35 +00:00
Joey Schulze
ed788aeeff Reset the 'restart' flag immediately after entering the restart code,
so that subsequent SIGHUPs are able to set it again and cause a new
restart.  This fixes a race condition when somebody sends tons of HUP
signals.
2006-05-25 07:49:54 +00:00
Joey Schulze
facf7ff5bb Applied adjusted patch by Miquel van Smoorenburg to fix spurious
hanging syslogd in connection with futex and NPTL introduced in recent
glibc versions and Linux 2.6 (details: http://bugs.debian.org/301511)
2005-05-25 18:08:30 +00:00
Joey Schulze
affedf39aa Applied patch by Dirk Mueller <mueller@kde.org> to prevent syslogd
from crashing when the log file can't grow anymore (e.g. with 2GB
without LargeFileSupport)
2005-01-15 19:13:08 +00:00
Joey Schulze
4d8248ba3e Remove trailing newline from forwarded messages. This would be turned
into a whitespace by the receiving syslogd and doesn't seem to be
required anyway.
2004-11-07 12:52:30 +00:00
Joey Schulze
4c09ec0516 Discard any timestamp information found in received syslog messages.
This will affect local messages sent from a different timezone.  Also
removed code due to the changed semantics.  This was inspired by
Anders Henke from Schlund + Partner AG.
2004-11-07 11:38:44 +00:00
Joey Schulze
b2e84809dc Colin Phipps <cph@cph.demon.co.uk>: Don't block on the network socket,
in case a packet gets lost between select and recv. (Debian Bug#275578)
2004-11-02 19:30:30 +00:00
Joey Schulze
a09b9865cc Adjust the size of a variable to prevent a buffer overflow
should _PATH_DEV ever contain something different than "/dev/".
2004-05-04 14:52:56 +00:00
Joey Schulze
4205dbebda Minor corrections 2004-05-04 14:50:18 +00:00
Joey Schulze
3ee89e2c0b Patch: sysklogd-1.4.1-owl-longjmp.diff from Openwall
From: Solar Designer <solar@openwall.com>

1. Ensures that "len" is not placed in a register and as such can't be
clobbered by longjmp().  With the particular code, it does not really
matter whether it is clobbered or not, but this avoids the gcc warning.

2. Makes endtty() the signal handler only after the variable that
function uses is initialized.  In the original code, the signal
handler was setup too early and if there would be SIGALRM before
control reaches setjmp(), syslogd would segfault (if not worse).

Basically, this is a minor correctness patch.
2004-05-04 14:49:23 +00:00
Joey Schulze
e9c3de7bfd From Openwalls: needs to be a USER_PROCESS 2004-04-29 10:58:40 +00:00
Joey Schulze
669d9991b7 Applied Openwall paranoia patches to improve crunch_list(). 2004-04-29 10:39:55 +00:00
Joey Schulze
2961c7b794 Patch by Steve Grubb <linux_4ever@yahoo.com> to correct memory calculation 2004-04-17 16:06:16 +00:00
Joey Schulze
ae499acae2 Moved the installation of the signal handler up a little bit so it
guaranteed to be available when the child is forked, hence, fixing a
race condition.  This used to create problems with UML and fast
machines.  Thanks to Jon Burgess <Jon_Burgess@eur.3com.com>
2003-09-28 10:26:22 +00:00
Joey Schulze
0f9873bed4 On heavily loaded systems, some which are probably receiving a lot of
syslog traffic through the network, there's a (not well researched)
problem with receiving messages on the syslog UDP port.  For some
reason recvfrom() results in EAGAIN.  See
http://bugs.debian.org/188194 and
http://www.ussg.iu.edu/hypermail/linux/kernel/0209.1/0218.html
2003-09-27 23:29:02 +00:00
Joey Schulze
8b02038df4 . Bumped patchlevel
. Changed versioning scheme to version.patchlevel (like 1.4.1)
2001-03-11 19:40:10 +00:00
Joey Schulze
c6edf85cd6 . Removed kernel.patch since it is no longer required
. Changed SOCK_STREAM to SOCK_DGRAM in syslog.c

 . klogd will only change the console log level if `-c' is supplied

 . syslogd.c by Bill Nottingham <notting@redhat.com>

   Um, if the directory is invalid, the bind() call in
   create_unix_socket fails. Without the return -1, we return the
   invalid fd that we just closed.  When syslogd then starts
   listening, select goes into a hard loop getting EBADF, IIRC.

 . klogd.c by Troels Walsted Hansen <troels@thule.no>

   I found a bug in the sysklogd package version 1.4. When it
   encounters a zero byte in the kernel logging output, the text
   parser enters a busy loop. I came upon it when the 3c59x driver
   from kernel 2.4.0 started outputting two zero bytes for the product
   code of my laptop's 3Com card. It could be argued that the kernel
   should never output zero bytes in the logging info, but obviously
   that will happen from time to time.

   I fear this bug might be considered a security issue as well, if
   the kernel can be coerced to output a zero byte somehow, all kernel
   logging will stop.

   Wolfgang Oertl <Wolfgang.Oertl@uibk.ac.at> had a similar bugfix
   idea

 . klogd.c by Thomas Roessler <roessler@does-not-exist.org>

   Additionally, the patch prevents LogLine from being invoked with a
   negative counter as an argument.
2001-03-11 19:35:52 +00:00
Joey Schulze
728d79d925 Mon Sep 18 15:33:26 CEST 2000: Martin Schulze <joey@infodrom.ffis.de>
Removed unixm/unix domain sockets and switch to Datagram Unix
    Sockets.  This should remove one possibility to play DoS with
    syslogd.  Thanks to Olaf Kirch <okir@caldera.de> for the patch.
2000-09-18 13:41:33 +00:00
Joey Schulze
5433c6018b Mon Sep 18 09:10:47 CEST 2000: Martin Schulze <joey@infodrom.ffis.de>
Fixed bug in printchopped() that caused syslogd to emit
      kern.emerg messages when splitting long lines.  Thanks to
      Daniel Jacobowitz <dan@debian.org> for the fix.
2000-09-18 07:13:08 +00:00
Joey Schulze
a1775f1d8c Sun Sep 17 21:26:16 CEST 2000: Martin Schulze <joey@infodrom.ffis.de>
Don't close open sockets upon reload.  Thanks to Bill Nottingham.
2000-09-17 19:30:50 +00:00
Joey Schulze
afcd97602f Sun Sep 17 20:45:33 CEST 2000: Martin Schulze <joey@infodrom.ffis.de>
Fixed some bugs in printline() code that did not escape
      control characters '\177' through '\237' and contained a
      single-byte buffer overflow.  Thanks to Solar Designer
      <solar@false.com>.
2000-09-17 18:49:39 +00:00
Joey Schulze
c762d84561 * Fixed typo in syslogd-listfiles (closes: Bug#35408)
* Removed superflous call to utmpname() (closes: Bug#34733)
  * Added --ignore-size and limit for rotating log files at 2MB to
    syslogd-listfiles (closes: Bug#36198)
1999-05-23 08:41:06 +00:00
Joey Schulze
64ce6b452e Args, the last commit contained some mistakes. 1999-01-19 11:31:58 +00:00
Joey Schulze
68b50092c7 * ``-m 0'' turns off -- MARK -- now. (closes: Bug#28629, Bug#31494)
* Changed Greg's e-mail address to represent his current one.
  * Shortened line length for kernel logging slightly.
  * Corrected return value of AddModule (closes: Bug#30093)
  * Finally fixed an error with `-a' processing, thanks to Topi Miettinen
    <tom@medialab.sonera.net> (closes: Bug#30462)
1999-01-19 00:09:12 +00:00
Joey Schulze
7d36dc9402 * Contains more patches from Topi Miettinen.
* Fixed two mistakes from the most recent version
  * Fixed fd leak problem.  Thanks to Topi for detecting it
  * Ouch!  Looks like the released package again is broken.  It worked
    locally.
1998-10-18 18:43:18 +00:00