summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-02 17:09:52 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:47:04 +0100
commitf4a1083cf9f64b4d2b65b68942e93861409ea90f (patch)
treef5e03ad4edfa14eaf09d9d781825a6a30b67b5a9 /source4/dsdb/samdb
parent2fa338cdc99276a5f85ad54cb88b372ffe8ab063 (diff)
downloadsamba-f4a1083cf9f64b4d2b65b68942e93861409ea90f.tar.gz
samba-f4a1083cf9f64b4d2b65b68942e93861409ea90f.tar.bz2
samba-f4a1083cf9f64b4d2b65b68942e93861409ea90f.zip
r26227: Make loadparm_context part of a server task, move loadparm_contexts further up the call stack.
(This used to be commit 0721a07aada6a1fae6dcbd610b8783df57d7bbad)
Diffstat (limited to 'source4/dsdb/samdb')
-rw-r--r--source4/dsdb/samdb/cracknames.c3
-rw-r--r--source4/dsdb/samdb/samdb.c5
-rw-r--r--source4/dsdb/samdb/samdb.h1
-rw-r--r--source4/dsdb/samdb/samdb_privilege.c3
4 files changed, 8 insertions, 4 deletions
diff --git a/source4/dsdb/samdb/cracknames.c b/source4/dsdb/samdb/cracknames.c
index c0c44c8602..c5f1bdaffb 100644
--- a/source4/dsdb/samdb/cracknames.c
+++ b/source4/dsdb/samdb/cracknames.c
@@ -33,6 +33,7 @@
#include "auth/auth.h"
#include "util/util_ldb.h"
#include "dsdb/samdb/samdb.h"
+#include "param/param.h"
static WERROR DsCrackNameOneFilter(struct ldb_context *sam_ctx, TALLOC_CTX *mem_ctx,
struct smb_krb5_context *smb_krb5_context,
@@ -1210,7 +1211,7 @@ NTSTATUS crack_name_to_nt4_name(TALLOC_CTX *mem_ctx,
return NT_STATUS_OK;
}
- ldb = samdb_connect(mem_ctx, system_session(mem_ctx));
+ ldb = samdb_connect(mem_ctx, global_loadparm, system_session(mem_ctx));
if (ldb == NULL) {
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
diff --git a/source4/dsdb/samdb/samdb.c b/source4/dsdb/samdb/samdb.c
index 310ef17c24..dd20937ab7 100644
--- a/source4/dsdb/samdb/samdb.c
+++ b/source4/dsdb/samdb/samdb.c
@@ -71,11 +71,12 @@ char *samdb_relative_path(struct ldb_context *ldb,
return an opaque context pointer on success, or NULL on failure
*/
struct ldb_context *samdb_connect(TALLOC_CTX *mem_ctx,
+ struct loadparm_context *lp_ctx,
struct auth_session_info *session_info)
{
struct ldb_context *ldb;
- ldb = ldb_wrap_connect(mem_ctx, global_loadparm,
- lp_sam_url(global_loadparm), session_info,
+ ldb = ldb_wrap_connect(mem_ctx, lp_ctx,
+ lp_sam_url(lp_ctx), session_info,
NULL, 0, NULL);
if (!ldb) {
return NULL;
diff --git a/source4/dsdb/samdb/samdb.h b/source4/dsdb/samdb/samdb.h
index 5d39b2cfb0..54d1ce2e75 100644
--- a/source4/dsdb/samdb/samdb.h
+++ b/source4/dsdb/samdb/samdb.h
@@ -26,6 +26,7 @@ struct auth_session_info;
struct dsdb_control_current_partition;
struct dsdb_extended_replicated_object;
struct dsdb_extended_replicated_objects;
+struct loadparm_context;
#include "librpc/gen_ndr/security.h"
#include "lib/ldb/include/ldb.h"
diff --git a/source4/dsdb/samdb/samdb_privilege.c b/source4/dsdb/samdb/samdb_privilege.c
index 7fe840fca9..468a26bf98 100644
--- a/source4/dsdb/samdb/samdb_privilege.c
+++ b/source4/dsdb/samdb/samdb_privilege.c
@@ -25,6 +25,7 @@
#include "auth/auth.h"
#include "libcli/security/security.h"
#include "util/util_ldb.h"
+#include "param/param.h"
/*
add privilege bits for one sid to a security_token
@@ -96,7 +97,7 @@ _PUBLIC_ NTSTATUS samdb_privilege_setup(struct security_token *token)
}
mem_ctx = talloc_new(token);
- samctx = samdb_connect(mem_ctx, system_session(mem_ctx));
+ samctx = samdb_connect(mem_ctx, global_loadparm, system_session(mem_ctx));
if (samctx == NULL) {
talloc_free(mem_ctx);
return NT_STATUS_INTERNAL_DB_CORRUPTION;