dsdb: Specify no event context to smb_krb5_init_context() in dsdb
authorAndrew Bartlett <abartlet@samba.org>
Thu, 17 Apr 2014 09:48:30 +0000 (21:48 +1200)
committerKarolin Seeger <kseeger@samba.org>
Tue, 15 Jul 2014 10:46:16 +0000 (12:46 +0200)
These routines parse principals and generate keys only, no network
communication is done.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 7a26989d4c62f38dcafc2a688b8cbaccc6499480)

source4/dsdb/samdb/cracknames.c
source4/dsdb/samdb/ldb_modules/password_hash.c
source4/dsdb/samdb/ldb_modules/update_keytab.c

index d09da25bb801cf44cce39b9eb23fc7fd7d2a66a2..5db5edee2d61a716cd0c5d7561542a9914d59321 100644 (file)
@@ -663,7 +663,7 @@ WERROR DsCrackNameOneName(struct ldb_context *sam_ctx, TALLOC_CTX *mem_ctx,
                char *unparsed_name;
 
                ret = smb_krb5_init_context(mem_ctx, 
-                                           ldb_get_event_context(sam_ctx),
+                                           NULL,
                                            (struct loadparm_context *)ldb_get_opaque(sam_ctx, "loadparm"), 
                                            &smb_krb5_context);
 
@@ -704,7 +704,7 @@ WERROR DsCrackNameOneName(struct ldb_context *sam_ctx, TALLOC_CTX *mem_ctx,
                char *service;
 
                ret = smb_krb5_init_context(mem_ctx, 
-                                           ldb_get_event_context(sam_ctx),
+                                           NULL,
                                            (struct loadparm_context *)ldb_get_opaque(sam_ctx, "loadparm"), 
                                            &smb_krb5_context);
 
index 7974169499073f7cf250c9e4b04cdf21bc5cfc93..36c3f4904f172dc116970a7716d23e0fdd5ac5a6 100644 (file)
@@ -2159,7 +2159,7 @@ static int setup_io(struct ph_context *ac,
        /* Some operations below require kerberos contexts */
 
        if (smb_krb5_init_context(ac,
-                                 ldb_get_event_context(ldb),
+                                 NULL,
                                  (struct loadparm_context *)ldb_get_opaque(ldb, "loadparm"),
                                  &io->smb_krb5_context) != 0) {
                return ldb_operr(ldb);
index 3291a8eb28030d08c8f57a3abaaf110c7560964c..afe7c27d0c46361fabf836896e1e03cef535f169 100644 (file)
@@ -377,7 +377,9 @@ static int update_kt_prepare_commit(struct ldb_module *module)
        struct update_kt_private *data = talloc_get_type(ldb_module_get_private(module), struct update_kt_private);
        struct dn_list *p;
        struct smb_krb5_context *smb_krb5_context;
-       int krb5_ret = smb_krb5_init_context(data, ldb_get_event_context(ldb), ldb_get_opaque(ldb, "loadparm"),
+       int krb5_ret = smb_krb5_init_context(data,
+                                            NULL,
+                                            ldb_get_opaque(ldb, "loadparm"),
                                             &smb_krb5_context);
        TALLOC_CTX *tmp_ctx;