summaryrefslogtreecommitdiffstats
path: root/ipa-client/ipa-getkeytab.c
diff options
context:
space:
mode:
authorJohn Dennis <jdennis@redhat.com>2012-03-29 21:34:19 -0400
committerRob Crittenden <rcritten@redhat.com>2012-04-10 18:07:10 -0400
commitb8f1292e869c3c0d2301809054eb21a72f02b180 (patch)
tree967421e0b801406c5a79ac6fba65b45cd8f0320a /ipa-client/ipa-getkeytab.c
parent717bbcd2bf624ad68ea1cdf08216ab4f06e8bc4d (diff)
downloadfreeipa.git-b8f1292e869c3c0d2301809054eb21a72f02b180.tar.gz
freeipa.git-b8f1292e869c3c0d2301809054eb21a72f02b180.tar.xz
freeipa.git-b8f1292e869c3c0d2301809054eb21a72f02b180.zip
Use indexed format specifiers in i18n strings
Translators need to reorder messages to suit the needs of the target language. The conventional positional format specifiers (e.g. %s %d) do not permit reordering because their order is tied to the ordering of the arguments to the printf function. The fix is to use indexed format specifiers. https://fedorahosted.org/freeipa/ticket/2596
Diffstat (limited to 'ipa-client/ipa-getkeytab.c')
-rw-r--r--ipa-client/ipa-getkeytab.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ipa-client/ipa-getkeytab.c b/ipa-client/ipa-getkeytab.c
index 05e57bbe..7d7b9717 100644
--- a/ipa-client/ipa-getkeytab.c
+++ b/ipa-client/ipa-getkeytab.c
@@ -82,7 +82,7 @@ static int ldap_sasl_interact(LDAP *ld, unsigned flags, void *priv_data, void *s
krberr = krb5_init_context(&krbctx);
if (krberr) {
- fprintf(stderr, _("Kerberos context initialization failed: %s (%d)\n"),
+ fprintf(stderr, _("Kerberos context initialization failed: %1$s (%2$d)\n"),
error_message(krberr), krberr);
in->result = NULL;
in->len = 0;
@@ -93,7 +93,7 @@ static int ldap_sasl_interact(LDAP *ld, unsigned flags, void *priv_data, void *s
krberr = krb5_unparse_name(krbctx, princ, &outname);
if (krberr) {
- fprintf(stderr, _("Unable to parse principal: %s (%d)\n"),
+ fprintf(stderr, _("Unable to parse principal: %1$s (%2$d)\n"),
error_message(krberr), krberr);
in->result = NULL;
in->len = 0;
@@ -511,7 +511,7 @@ static int ipa_ldap_init(LDAP ** ld, const char * scheme, const char * servernam
{
char* url = NULL;
int url_len = snprintf(url,0,"%s://%s:%d",scheme,servername,port) +1;
-
+
url = (char *)malloc (url_len);
if (!url){
fprintf(stderr, _("Out of memory \n"));
@@ -570,7 +570,7 @@ static int ldap_set_keytab(krb5_context krbctx,
if (ldap_set_option(NULL, LDAP_OPT_X_TLS_CACERTFILE, "/etc/ipa/ca.crt") != LDAP_OPT_SUCCESS) {
goto error_out;
}
-
+
if ( ipa_ldap_init(&ld, "ldaps",servername, 636) != LDAP_SUCCESS){
goto error_out;
}
@@ -579,7 +579,7 @@ static int ldap_set_keytab(krb5_context krbctx,
}
} else {
if (ipa_ldap_init(&ld, "ldap",servername, 389) != LDAP_SUCCESS){
- goto error_out;
+ goto error_out;
}
}
@@ -731,7 +731,7 @@ static int ldap_set_keytab(krb5_context krbctx,
keys->ksdata[i].enctype);
} else {
fprintf(stderr, _("Failed to retrieve "
- "encryption type %s (#%d)\n"),
+ "encryption type %1$s (#%2$d)\n"),
enc, keys->ksdata[i].enctype);
}
} else {