[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#161340: libc6: syslog(3) shouldn't use current locale to generate timestamp



Package: libc6
Version: 2.2.5-14
Severity: normal

The syslog(3) function is using the current locale when generating
the timestamp of the message. This will result in a violation of
RFC3164.txt which states that the syslog timestamp should use the
English months names:

(From RFC3164)

The TIMESTAMP field is the local time and is in the format of "Mmm dd
   hh:mm:ss" (without the quote marks) where:

         Mmm is the English language abbreviation for the month of the
         year with the first character in uppercase and the other two
         characters in lowercase.  The following are the only acceptable
         values:

         Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec

(End)

Also, using localized month names may result in month names using
8bit character (like aoû in French) which is a clear violation of
the syslog RFC.

This will also makes most (if not all) syslog log analysers fail.

You can test this problem by running the following command:

$ export LC_TIME=fr_CA
$ logger -t Test "Syslog test"

You'll see that the following in the /var/log/user.log log file:

sep 18 09:37:48 Arendt Test: Syslog test

instead of

Sep 18 09:38:10 Arendt Test: Syslog test

when running without LC_TIME.

-- System Information
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux Arendt.Contre.COM 2.4.18 #1 mar jun 4 17:09:32 EDT 2002 i686
Locale: LANG=C, LC_CTYPE=fr_CA




Reply to: