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)
committerAndrew Bartlett <abartlet@samba.org>
Sun, 27 Apr 2014 22:09:21 +0000 (00:09 +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>
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 1dee6af8f39f118bd80fa68ff8c173989b074f5b..85c9c1bd1532692f0028ae70318054e8f3ab8046 100644 (file)
@@ -2231,7 +2231,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 6b195459e9eff524386115fc57503be4a772bbe4..7b056ba9defea82b2fc431025072f1ee3f2c5004 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 = NULL;