s4:provision.c - "provsion_store_self_join" - don't set the realm if it's NULL
[samba.git] / source4 / param / secrets.c
index 576df0a4fe475de523807eef4816cdfb940afa3a..f21be822a27d75ca28a083f6883ece1f2200d5e2 100644 (file)
@@ -86,7 +86,7 @@ struct tdb_wrap *secrets_init(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_c
   connect to the secrets ldb
 */
 struct ldb_context *secrets_db_connect(TALLOC_CTX *mem_ctx,
-                                       struct event_context *ev_ctx,
+                                       struct tevent_context *ev_ctx,
                                        struct loadparm_context *lp_ctx)
 {
        char *path;
@@ -119,6 +119,13 @@ struct ldb_context *secrets_db_connect(TALLOC_CTX *mem_ctx,
                return NULL;
        }
 
+       /* the update_keytab module relies on this being setup */
+       if (ldb_set_opaque(ldb, "loadparm", lp_ctx) != LDB_SUCCESS) {
+               talloc_free(path);
+               talloc_free(ldb);
+               return NULL;
+       }
+
        talloc_free(path);
        
        return ldb;
@@ -129,7 +136,7 @@ struct ldb_context *secrets_db_connect(TALLOC_CTX *mem_ctx,
  * @return pointer to a SID object if the SID could be obtained, NULL otherwise
  */
 struct dom_sid *secrets_get_domain_sid(TALLOC_CTX *mem_ctx,
-                                      struct event_context *ev_ctx,
+                                      struct tevent_context *ev_ctx,
                                       struct loadparm_context *lp_ctx,
                                       const char *domain)
 {