]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libads: fix indentation in generated krb5.conf
authorUri Simchoni <urisimchoni@gmail.com>
Thu, 21 May 2015 05:40:24 +0000 (08:40 +0300)
committerJeremy Allison <jra@samba.org>
Mon, 15 Jun 2015 23:29:24 +0000 (01:29 +0200)
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 <urisimchoni@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
source3/libads/kerberos.c

index d5d8e2afc034f946589226466e584a87257a7789..ed343e2123247d652be3d72b2df29adb5cf1ae11 100644 (file)
@@ -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);