Commit Graph

62 Commits

Author SHA1 Message Date
Joey Schulze
48b01b926c * New upstream source (closes: Bug#87819, Bug#70790, Bug#32580,
Bug#62358, Bug#71631)
  * Upstream: Doesn't re-set log-level if not requested (closes:
    Bug#76170, Bug#76170, Bug#85289)
  * Upstream: Ignore zero bytes (closes: Bug#85478, Bug#85478, Bug#41068)
  * Upstream: Corrected documentation for `-s' (closes: Bug#87020)
  * Upstream: test for existence of syslogd-listfiles before calling
    them.  This got lost due to 1.4.0 brokennes which was packaged and
    removed some hours later (closes: Bug#84872, Bug#66712)
  * Applied patch by Tommi Virtanen <tv@debian.org> splitting the package
    into `sysklogd' and `klogd' (closes:Bug#35586, Bug#72043, Bug#74864,
    Bug#72122)
  * Provide / depend on virtual packages system-log-daemon
    and linux-kernel-log-daemon (closes: Bug#67604)
  * Applied patch from Tim Janik <timj@gtk.org> to support `-s pattern' in
    syslogd-listfiles
  * Transition to FHS, i.e. /usr/share/doc instead of /usr/doc and
    /usr/share/man instead of /usr/man (closes:  Bug#79250, Bug#80771)
  * Use --exec for stopping services (closes: Bug#76757)
  * Corrected broken character in klogd.8 (cloes: Bug#75932)
  * Only rotate logfiles with size greater than zero.  This got lost due
    to 1.4.0 brokennes which was packaged and removed some hours later
    (closes: Bug#74993, Bug#49824)
  * Added another note about modificability of cronjobs (closes:
    Bug#88741)
  * Since klogd replaces parts of sysklogd a proper Replaces line is there
  * Added final newline to CHANGES
2001-03-11 23:00:51 +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
dffa03bda1 . klogd will only change the console log level if `-c' is supplied
. 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:51 +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
f5c0fbfb22 Added patch to fix priority decoding after moving kernel messgages
into "%s".  Thanks to Solar Designer <solar@false.com> for the patch.

This refers to CVE-2000-0867
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2000-0867

  Kernel logging daemon (klogd) in Linux does not properly cleanse
  user-injected format strings, which allows local users to gain root
  privileges by triggering malformed kernel messages.

Except, users cannot insert arbitrary strings in the kernel log
rinbuffer, can they?
2000-09-18 07:34:12 +00:00
Joey Schulze
d2a6fb08dc Mon Sep 18 09:32:27 CEST 2000: Martin Schulze <joey@infodrom.ffis.de>
Added patch to fix priority decoding after moving kernel
      messgages into "%s".  Thanks to Solar Designer
      <solar@false.com> for the patch.
2000-09-18 07:34:11 +00:00
Joey Schulze
e791826bd5 bump up the version 2000-09-18 07:33:58 +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
03f751675f Last preparation for 1.4 2000-09-17 19:44:52 +00:00
Joey Schulze
8638c1710e Removed old announce 2000-09-17 19:42:58 +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
50539e29d4 . Close symbol file before returning with 0 when an error occurred
while reading it.  This will enable systems to umount that
   partition with no open file descriptor left over.
2000-09-12 21:53:31 +00:00
Joey Schulze
2c81663786 . Use lseek64() instead of llseek() which is deprecated these days
. Keith Owens <kaos@ocs.com.au>
   - Fixed bug that caused klogd to die if there is no sym_array available.
   - When symbols are expanded, print the line twice.  Once with
     addresses converted to symbols, once with the raw text.  Allows
     external programs such as ksymoops do their own processing on the
     original data.
2000-09-12 21:15:28 +00:00
Joey Schulze
955a093c05 Two spaces after fullstop. 1999-08-21 10:49:14 +00:00
Joey Schulze
8440db2b28 . Started with CHANGES file
. Skip newline when reading in klog messages
1999-08-21 10:28:44 +00:00
Joey Schulze
263b17247e Adjustments 1999-08-21 10:26:42 +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
Joey Schulze
2b70a699f1 * Re-Applied patch provided vom Topi Miettinen with regard to the people
from OpenBSD.  This provides the additional '-a' argument used for
    specifying additional UNIX domain sockets to listen to.  This is been
    used with chroot()'ed named's for example.  An example is described at
    http://www.psionic.com/papers/dns.html.  This time the patch doesn't
    stall syslogd.  Thanks to Topi Miettinen <tom@medialab.sonera.net>
    (closes: Bug#24893)
1998-10-17 18:23:19 +00:00
Joey Schulze
3acc6c3a40 * Reverted support for multiple Unix domain sockets since it caused
syslogd to not accept more sockets after a certain (undefinitve)
    time.  (opens: Bug#24893)
  * The complete code is still present, search for `Bug#24893'
  * Commented out `-a' in the syslogd.8 manpage
1998-10-15 17:35:38 +00:00
Joey Schulze
7bc8d64bac Added tklogd to clobber target. 1998-10-12 20:25:15 +00:00
Joey Schulze
4f30ea0acd Mon Oct 12 20:49:18 MET DST 1998: Martin Schulze <joey@infodrom.north.de>
Avoid logging of SIGCHLD when syslogd is in the process of
      exiting and closing its files.  Again thanks to Topi.

  Mon Oct 12 22:18:34 CEST 1998: Martin Schulze <joey@infodrom.north.de>
      Modified printline() to support 8bit characters - such as
      russion letters.  Thanks to Vladas Lapinskas <lapinskas@mail.iae.lt>.
1998-10-12 20:20:25 +00:00
Joey Schulze
8e054c5f41 * Code cleanups with regard to bsd -> posix transition and stronger
security (buffer length checking).  Thanks to Topi Miettinen
    <tom@medialab.sonera.net> (closes: Bug#24894)
    . index() --> strchr()
    . sprintf() --> snprintf()
    . bcopy() --> memcpy()
    . bzero() --> memset()
    . UNAMESZ --> UT_NAMESIZE
    . sys_errlist --> strerror()
  * Added support for setutent()/getutent()/endutend() instead of binary
    reading the UTMP file.  This is the the most portable way.  Thanks to
    Topi Miettinen <tom@medialab.sonera.net>.
1998-10-12 18:24:48 +00:00
Joey Schulze
30271480d1 Added support for TESTING. 1998-10-12 16:58:12 +00:00
Joey Schulze
3aed3fb33a Added support for tklogd and tsyslogd which are testing environments. 1998-10-12 16:57:53 +00:00
Joey Schulze
b1b46e241f Changed the define. 1998-10-12 16:47:05 +00:00
Joey Schulze
f056a45925 Added documentation for `-a' argument. 1998-10-12 16:46:11 +00:00
Joey Schulze
f03fe8ea2c Added URL. 1998-10-12 16:43:28 +00:00
Joey Schulze
6eb4f0248d Added additional array boundary check. 1998-10-12 16:40:20 +00:00
Joey Schulze
b0720eb617 Mon Oct 12 00:42:30 CEST 1998: Martin Schulze <joey@infodrom.north.de>
Modified CheckVersion()
      . Use shift to decode the kernel version
      . Compare integers of kernel version
      . extract major.minor.patch from utsname.release via sscanf()
      The reason lays in possible use of kernel flavours which
      modify utsname.release but no the Version_ symbol.
1998-10-12 16:39:49 +00:00
Joey Schulze
6abd86e133 Sat Oct 10 20:01:48 CEST 1998: Martin Schulze <joey@infodrom.north.de>
Added support for TESTING define which will turn klogd into
      stdio-mode used for debugging.

  Mon Oct 12 13:01:27 MET DST 1998: Martin Schulze <joey@infodrom.north.de>
      Used unsigned long and strtoul() to resolve kernel oops symbols.
1998-10-12 16:38:30 +00:00
Joey Schulze
0e4915d405 Mon Oct 12 13:30:35 CEST 1998: Martin Schulze <joey@infodrom.north.de>
Redirected some error output with regard to argument parsing to
      stderr.

  Mon Oct 12 14:02:51 CEST 1998: Martin Schulze <joey@infodrom.north.de>
      Applied patch provided vom Topi Miettinen with regard to the
      people from OpenBSD.  This provides the additional '-a'
      argument used for specifying additional UNIX domain sockets to
      listen to.  This is been used with chroot()'ed named's for
      example.

  Mon Oct 12 18:29:44 CEST 1998: Martin Schulze <joey@infodrom.north.de>
      Added `ftp' facility which was introduced in glibc version 2.
      It's #ifdef'ed so won't harm with older libraries.
1998-10-12 16:36:18 +00:00
Joey Schulze
cf7e986344 . Added support for TESTING define which will turn syslogd into
stdio-mode used for debugging.

 . Reworked the initialization/fork code.  Now the parent process
   activates a signal handler which the daughter process will raise if
   it is initialized.  Only after that one the parent process may
   exit.  Otherwise klogd might try to flush its log cache while
   syslogd can't receive the messages yet.
1998-10-12 11:35:02 +00:00
Joey Schulze
c924428cb7 * The code now is compilable without SYSLOG_INET again. Thanks to
Enrik Berkhan <enrik@rzstud1.akk.org>.
1998-07-10 23:56:53 +00:00
Joey Schulze
7326d197dd * Postinst will create files with correct file modes (closes: Bug#21212)
* Made /dev/xconsole mode 0640 and root.adm (closes: Bug#11917)
  * Changed priority of exit message from LOG_ERR to LOG_INFO (closes
    Bug#21606)
1998-06-12 23:43:39 +00:00
Joey Schulze
0beb8eec6d Corrected Mark's email address. 1998-04-13 23:46:21 +00:00
Joey Schulze
1f3d627188 * Fixed typos in syslogd-listfiles(1), thanks to Francesco Potorti`
<F.Potorti@cnuce.cnr.it> (closes: Bug#20903)
  * Corrected email address for Shane Alderton (closes: Bug#20765)
  * Fixed manpage to not reflect reverse implementated SIGALRM signal
    handler (closes: Bug#20647)
  * Modified behaviour with including <sys/module.h> (closes: Bug#20556)
  * Added correct prototype for llseek() (closes: Bug#20507, Bug#20220)
  * Added more log information if problems occurr while reading a system
    map file.
  * Modified System.map read function to try all possible map files until
    a file with matching version is found.
  * Added Debian release to klogd
  * Switched to fgets() as gets() is not buffer overrun secure.
  * Modified loop for detecting the correct system map.
1998-04-13 23:27:37 +00:00
Joey Schulze
92fe2ad65d * Applied patch from Pedro Manuel Rodrigues <pmanuel@cindy.fe.up.pt> to
let klogd work togther with >2GB address space.
1998-03-19 22:56:43 +00:00
Joey Schulze
69331684e1 * Corrected Topi's patch as it prevented forwarding during startup due
to an unknown LogPort.
  * Finalized it
1998-02-25 12:20:58 +00:00
Joey Schulze
de54a7e0c7 Fixed little comparison mistake that prevented the MARK
feature to work properly.
1998-02-25 09:53:47 +00:00
Joey Schulze
d9d28b60d0 * Applied patch from Topi Miettinen <Topi.Miettinen@ml.tele.fi> to open
the UDP socket only if it is really needed.
  * Updated sysklogd(8) manpage
  * Added note to mailing list
1998-02-23 23:41:00 +00:00
Joey Schulze
255435250b Corrected FSFs address (lintian) 1998-02-10 22:37:14 +00:00
Joey Schulze
e7509db5e3 * Removed killall-statement from postinst. Thanks to James Troup for
reporting it.
  * Added chdir("/") to both daemons (fixes: Bug#17601)
1998-01-29 20:40:48 +00:00
Joey Schulze
be8b841a11 * Another patch for Linux/alpha by Christopher C Chimelis
<chris@classnet.med.miami.edu> (fixes: Bug#17385)
1998-01-25 21:06:08 +00:00
Joey Schulze
1a13ecfda1 As the bug covering the %'s introduced a problem with
unevaluated priorities I've worked out a real fix that strips
  %'s to an even number which is harmless for printf.
1998-01-25 20:52:12 +00:00
Joey Schulze
5a279c7af7 * Fixed small typo in syslogd-listfiles
* Corrected debug output concerning remote receiption
  * Removed race condition in syslogd-listfiles
  * Modified logfile detection routine to take care of double listed
    logfiles.  Thanks to Roman Hodek <roman@debian.org> for providing an
    appropriate patch.  (Bug#17000)
1998-01-13 01:30:28 +00:00