s4: Add kerberos tracing
authorSwen Schillig <swen@linux.ibm.com>
Wed, 5 Dec 2018 10:55:09 +0000 (11:55 +0100)
committerChristof Schmitt <cs@samba.org>
Thu, 20 Dec 2018 00:31:17 +0000 (01:31 +0100)
Replace kerberos context initialization from
raw krb5_init_context() to smb_krb5_init_context_basic()
which is adding common tracing as well.

Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Autobuild-User(master): Christof Schmitt <cs@samba.org>
Autobuild-Date(master): Thu Dec 20 01:31:17 CET 2018 on sn-devel-144

source4/kdc/ktutil.c
source4/kdc/sdb_to_kdb.c

index bc263c5..59aa1cf 100644 (file)
@@ -59,10 +59,10 @@ int main (int argc, char **argv)
 
        keytab_name = argv[1];
 
-       initialize_krb5_error_table();
-
-       ret = krb5_init_context(&context);
+       ret = smb_krb5_init_context_common(&context);
        if (ret) {
+               DBG_ERR("kerberos init context failed (%s)\n",
+                       error_message(ret));
                smb_krb5_err(mem_ctx, context, 1, ret, "krb5_context");
        }
 
index 74d8827..1411b0f 100644 (file)
@@ -327,8 +327,10 @@ static int samba_kdc_kdb_entry_destructor(struct samba_kdc_entry *p)
                entry_ex->e_data = NULL;
        }
 
-       ret = krb5_init_context(&context);
+       ret = smb_krb5_init_context_common(&context);
        if (ret) {
+               DBG_ERR("kerberos init context failed (%s)\n",
+                       error_message(ret));
                return ret;
        }