summaryrefslogtreecommitdiffstats
path: root/src/clients
diff options
context:
space:
mode:
authorBen Kaduk <kaduk@mit.edu>2012-07-05 14:56:50 -0400
committerBen Kaduk <kaduk@mit.edu>2012-07-06 14:06:12 -0400
commit75c7c600b49a7f1d5cf95260fc073cb4ba5929cd (patch)
tree46bcba94693b0171533a55a7d0eee54c0bf35306 /src/clients
parent1df4d98ca14d884808b1d4f746edd4c7f55dbd7e (diff)
downloadkrb5-75c7c600b49a7f1d5cf95260fc073cb4ba5929cd.tar.gz
krb5-75c7c600b49a7f1d5cf95260fc073cb4ba5929cd.tar.xz
krb5-75c7c600b49a7f1d5cf95260fc073cb4ba5929cd.zip
Enable all localizations in main functions
Bite the bullet and pass LC_ALL to setlocale() instead of just LC_MESSAGES. Calls to setlocale() itself were introduced in fabbf9e443459e8c0161c84563690ed70c7f6a61 for ticket 6918, but only for LC_MESSAGES since only localized strings were needed and that was the most conservative option. However, klist, kadmin, and kinit (and perhaps others) would benefit from localized formats for times (i.e., LC_TIME). If potentially localized data is being sent on the wire, that is a bug that should be fixed. No such bugs are found with the current test suite, so we are comfortable enabling LC_ALL at this time. ticket: 7192
Diffstat (limited to 'src/clients')
-rw-r--r--src/clients/kdestroy/kdestroy.c2
-rw-r--r--src/clients/kinit/kinit.c2
-rw-r--r--src/clients/klist/klist.c2
-rw-r--r--src/clients/kpasswd/kpasswd.c2
-rw-r--r--src/clients/kswitch/kswitch.c2
-rw-r--r--src/clients/kvno/kvno.c2
6 files changed, 6 insertions, 6 deletions
diff --git a/src/clients/kdestroy/kdestroy.c b/src/clients/kdestroy/kdestroy.c
index 176f6e2e39..2d13cd996f 100644
--- a/src/clients/kdestroy/kdestroy.c
+++ b/src/clients/kdestroy/kdestroy.c
@@ -81,7 +81,7 @@ main(argc, argv)
int quiet = 0;
int all = 0;
- setlocale(LC_MESSAGES, "");
+ setlocale(LC_ALL, "");
progname = GET_PROGNAME(argv[0]);
while ((c = getopt(argc, argv, "54Aqc:")) != -1) {
diff --git a/src/clients/kinit/kinit.c b/src/clients/kinit/kinit.c
index 1bf7564a12..b24c32abf3 100644
--- a/src/clients/kinit/kinit.c
+++ b/src/clients/kinit/kinit.c
@@ -820,7 +820,7 @@ main(argc, argv)
struct k5_data k5;
int authed_k5 = 0;
- setlocale(LC_MESSAGES, "");
+ setlocale(LC_ALL, "");
progname = GET_PROGNAME(argv[0]);
/* Ensure we can be driven from a pipe */
diff --git a/src/clients/klist/klist.c b/src/clients/klist/klist.c
index ce86597ada..402858e464 100644
--- a/src/clients/klist/klist.c
+++ b/src/clients/klist/klist.c
@@ -118,7 +118,7 @@ main(argc, argv)
char *name;
int mode;
- setlocale(LC_MESSAGES, "");
+ setlocale(LC_ALL, "");
progname = GET_PROGNAME(argv[0]);
name = NULL;
diff --git a/src/clients/kpasswd/kpasswd.c b/src/clients/kpasswd/kpasswd.c
index 7aed0f1ac8..4fc773e6b5 100644
--- a/src/clients/kpasswd/kpasswd.c
+++ b/src/clients/kpasswd/kpasswd.c
@@ -60,7 +60,7 @@ int main(int argc, char *argv[])
int result_code;
krb5_data result_code_string, result_string;
- setlocale(LC_MESSAGES, "");
+ setlocale(LC_ALL, "");
if (argc > 2) {
fprintf(stderr, _("usage: %s [principal]\n"), argv[0]);
exit(1);
diff --git a/src/clients/kswitch/kswitch.c b/src/clients/kswitch/kswitch.c
index 42cc9d6644..6c721d2886 100644
--- a/src/clients/kswitch/kswitch.c
+++ b/src/clients/kswitch/kswitch.c
@@ -57,7 +57,7 @@ main(int argc, char **argv)
const char *cache_name = NULL, *princ_name = NULL;
krb5_boolean errflag = FALSE;
- setlocale(LC_MESSAGES, "");
+ setlocale(LC_ALL, "");
progname = GET_PROGNAME(argv[0]);
while ((c = getopt(argc, argv, "c:p:")) != -1) {
diff --git a/src/clients/kvno/kvno.c b/src/clients/kvno/kvno.c
index 6a58d01f60..9b4f2050d4 100644
--- a/src/clients/kvno/kvno.c
+++ b/src/clients/kvno/kvno.c
@@ -68,7 +68,7 @@ int main(int argc, char *argv[])
char *sname = NULL, *for_user = NULL;
int canon = 0, unknown = 0, proxy = 0;
- setlocale(LC_MESSAGES, "");
+ setlocale(LC_ALL, "");
set_com_err_hook (extended_com_err_fn);
prog = strrchr(argv[0], '/');