From: Uri Simchoni Date: Thu, 21 May 2015 05:40:24 +0000 (+0300) Subject: libads: fix indentation in generated krb5.conf X-Git-Tag: talloc-2.1.3~518 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a9325f185c6894f723c278898b3f6738ecf9d6f9;p=thirdparty%2Fsamba.git libads: fix indentation in generated krb5.conf In case of multiple KDCs, the automatically-generated domain-specific kerberos configuration file lists all the KDCs it can find, but the indentation of additional KDCs is not aligned with that of the first KDC. Signed-off-by: Uri Simchoni Reviewed-by: Jeremy Allison Reviewed-by: Alexander Bokovoy --- diff --git a/source3/libads/kerberos.c b/source3/libads/kerberos.c index d5d8e2afc03..ed343e21232 100644 --- a/source3/libads/kerberos.c +++ b/source3/libads/kerberos.c @@ -663,7 +663,7 @@ static char *get_kdc_ip_string(char *mem_ctx, char *result = NULL; struct netlogon_samlogon_response **responses = NULL; NTSTATUS status; - char *kdc_str = talloc_asprintf(mem_ctx, "%s\tkdc = %s\n", "", + char *kdc_str = talloc_asprintf(mem_ctx, "%s\t\tkdc = %s\n", "", print_canonical_sockaddr_with_port(mem_ctx, pss)); if (kdc_str == NULL) { @@ -754,7 +754,7 @@ static char *get_kdc_ip_string(char *mem_ctx, } /* Append to the string - inefficient but not done often. */ - new_kdc_str = talloc_asprintf(mem_ctx, "%s\tkdc = %s\n", + new_kdc_str = talloc_asprintf(mem_ctx, "%s\t\tkdc = %s\n", kdc_str, print_canonical_sockaddr_with_port(mem_ctx, &dc_addrs[i])); if (new_kdc_str == NULL) { @@ -872,7 +872,7 @@ bool create_local_private_krb5_conf_for_domain(const char *realm, "\tdefault_tkt_enctypes = %s RC4-HMAC DES-CBC-CRC DES-CBC-MD5\n" "\tpreferred_enctypes = %s RC4-HMAC DES-CBC-CRC DES-CBC-MD5\n\n" "[realms]\n\t%s = {\n" - "\t%s\t}\n", + "%s\t}\n", realm_upper, aes_enctypes, aes_enctypes, aes_enctypes, realm_upper, kdc_ip_string);