[Pkg-shadow-commits] r1761 - in upstream/trunk: . lib

nekral-guest at alioth.debian.org nekral-guest at alioth.debian.org
Sun Feb 3 17:53:21 UTC 2008


Author: nekral-guest
Date: 2008-02-03 17:53:21 +0000 (Sun, 03 Feb 2008)
New Revision: 1761

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/NEWS
   upstream/trunk/lib/defines.h
Log:
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.


Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2008-02-03 17:45:58 UTC (rev 1760)
+++ upstream/trunk/ChangeLog	2008-02-03 17:53:21 UTC (rev 1761)
@@ -1,5 +1,12 @@
 2008-02-03  Nicolas François  <nicolas.francois at centraliens.net>
 
+	* 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  <nicolas.francois at centraliens.net>
+
 	* NEWS: newusers will behave more like useradd.
 	* src/newusers.c: The user's ID must be found before the group ID
 	to mimic useradd's behavior choices of UID and GID.

Modified: upstream/trunk/NEWS
===================================================================
--- upstream/trunk/NEWS	2008-02-03 17:45:58 UTC (rev 1760)
+++ upstream/trunk/NEWS	2008-02-03 17:53:21 UTC (rev 1761)
@@ -9,6 +9,9 @@
     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.

Modified: upstream/trunk/lib/defines.h
===================================================================
--- upstream/trunk/lib/defines.h	2008-02-03 17:45:58 UTC (rev 1760)
+++ upstream/trunk/lib/defines.h	2008-02-03 17:53:21 UTC (rev 1761)
@@ -142,13 +142,15 @@
    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);		\




More information about the Pkg-shadow-commits mailing list