diff --git a/ChangeLog b/ChangeLog index d99a732a..b30ddf33 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-02-03 Nicolas François + + * NEWS, lib/defines.h: Switch to the C locale before sending + messages to syslog. The messages sent by shadow were not + translated, but error messages from PAM returned by pam_strerror() + were translated in the users's locale. + 2008-02-03 Nicolas François * NEWS: newusers will behave more like useradd. diff --git a/NEWS b/NEWS index 93887c13..0d853b99 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,9 @@ shadow-4.1.0 -> shadow-4.1.1 UNRELEASED generated in the same second. - packaging * Do not install the shadow library per default. +- general + * Do not translate the messages sent to syslog. This avoids logging + PAM error messages in the users's locale. - chage * Fix bug which forbid to set the aging information of an account with a passwd entry, but no shadow entry. diff --git a/lib/defines.h b/lib/defines.h index e46b80fc..a3ab5aaf 100644 --- a/lib/defines.h +++ b/lib/defines.h @@ -142,13 +142,15 @@ char *strchr (), *strrchr (), *strtok (); syslogd should log the current system time for each event, and not trust the formatted time received from the unix domain (or worse, UDP) socket. -MM */ +/* Avoid translated PAM error messages: Set LC_ALL to "C". + * --Nekral */ #define SYSLOG(x) \ do { \ char *saved_locale = setlocale(LC_ALL, NULL); \ if (saved_locale) \ saved_locale = strdup(saved_locale); \ if (saved_locale) \ - setlocale(LC_TIME, "C"); \ + setlocale(LC_ALL, "C"); \ syslog x ; \ if (saved_locale) { \ setlocale(LC_ALL, saved_locale); \