summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-10-28 02:29:32 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:45:22 -0500
commit524eeac06427aed352b9f3c9b583399b32b18c38 (patch)
tree98f17ae3767b939184674c624c1d1874398af600 /source4
parent900d6fab322dfa8a0ff8a17fb440d269c8d6c678 (diff)
downloadsamba-524eeac06427aed352b9f3c9b583399b32b18c38.tar.gz
samba-524eeac06427aed352b9f3c9b583399b32b18c38.tar.bz2
samba-524eeac06427aed352b9f3c9b583399b32b18c38.zip
r11350: Add some debugs to assist tracking down kerberos issues in future.
(Make it easy to see what was put into the keytab, so we can tell when gssapi screams that it can't pull it out). Andrew Bartlett (This used to be commit c56142c4ac7541fc30bdf4c77e34f5a50d80da76)
Diffstat (limited to 'source4')
-rw-r--r--source4/auth/kerberos/kerberos_util.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/source4/auth/kerberos/kerberos_util.c b/source4/auth/kerberos/kerberos_util.c
index 6a09562dca..b9f36b16e5 100644
--- a/source4/auth/kerberos/kerberos_util.c
+++ b/source4/auth/kerberos/kerberos_util.c
@@ -232,6 +232,7 @@ static int free_keytab(void *ptr) {
krb5_principal salt_princ;
krb5_principal princ;
krb5_keytab keytab;
+ char *enctype_string = NULL;
TALLOC_CTX *mem_ctx = talloc_new(parent_ctx);
if (!mem_ctx) {
@@ -257,7 +258,7 @@ static int free_keytab(void *ptr) {
smb_krb5_context,
&salt_princ);
if (ret) {
- DEBUG(1,("create_memory_keytab: maksing salt principal failed (%s)\n",
+ DEBUG(1,("create_memory_keytab: makeing salt principal failed (%s)\n",
smb_get_krb5_error_message(smb_krb5_context->krb5_context,
ret, mem_ctx)));
talloc_free(mem_ctx);
@@ -266,7 +267,7 @@ static int free_keytab(void *ptr) {
ret = principal_from_credentials(mem_ctx, machine_account, smb_krb5_context, &princ);
if (ret) {
- DEBUG(1,("create_memory_keytab: maksing krb5 principal failed (%s)\n",
+ DEBUG(1,("create_memory_keytab: makeing krb5 principal failed (%s)\n",
smb_get_krb5_error_message(smb_krb5_context->krb5_context,
ret, mem_ctx)));
talloc_free(mem_ctx);
@@ -311,6 +312,13 @@ static int free_keytab(void *ptr) {
return ret;
}
+ krb5_keytype_to_string(smb_krb5_context->krb5_context, ENCTYPE_ARCFOUR_HMAC, &enctype_string);
+ DEBUG(5, ("Added %s(kvno %d) to keytab (%s)\n",
+ cli_credentials_get_principal(machine_account, mem_ctx),
+ cli_credentials_get_kvno(machine_account),
+ enctype_string));
+ free(enctype_string);
+
krb5_free_keyblock_contents(smb_krb5_context->krb5_context, &entry.keyblock);
talloc_steal(parent_ctx, *keytab_container);
@@ -354,6 +362,14 @@ static int free_keytab(void *ptr) {
krb5_free_keyblock_contents(smb_krb5_context->krb5_context, &entry.keyblock);
return ret;
}
+
+ enctype_string = NULL;
+ krb5_keytype_to_string(smb_krb5_context->krb5_context, enctypes[i], &enctype_string);
+ DEBUG(5, ("Added %s(kvno %d) to keytab (%s)\n",
+ cli_credentials_get_principal(machine_account, mem_ctx),
+ cli_credentials_get_kvno(machine_account),
+ enctype_string));
+ free(enctype_string);
krb5_free_keyblock_contents(smb_krb5_context->krb5_context, &entry.keyblock);
}
@@ -385,6 +401,14 @@ static int free_keytab(void *ptr) {
return ret;
}
+ enctype_string = NULL;
+ krb5_keytype_to_string(smb_krb5_context->krb5_context, enctypes[i], &enctype_string);
+ DEBUG(5, ("Added %s(kvno %d) to keytab (%s)\n",
+ cli_credentials_get_principal(machine_account, mem_ctx),
+ cli_credentials_get_kvno(machine_account),
+ enctype_string));
+ free(enctype_string);
+
krb5_free_keyblock_contents(smb_krb5_context->krb5_context, &entry.keyblock);
}
}