summaryrefslogtreecommitdiff
path: root/source4/ldap_server/ldap_hacked_ldb.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-06-20 04:59:10 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:18:35 -0500
commitdb6933323c0997cc6334d447e9a938cb42731ae9 (patch)
tree7aee8be52e77bc7238f23f8aa13e619ea0c8465a /source4/ldap_server/ldap_hacked_ldb.c
parentbd7a474b1967423711ff93c0080ce0f89270e3f9 (diff)
downloadsamba-db6933323c0997cc6334d447e9a938cb42731ae9.tar.gz
samba-db6933323c0997cc6334d447e9a938cb42731ae9.tar.bz2
samba-db6933323c0997cc6334d447e9a938cb42731ae9.zip
r7777: allow for overriding the location of the sam databasein the ldap server, using
ldapsrv:samdb option. This allows the following: sam database=ldap://localhost ldapsrv:samdb=tdb:///home/tridge/samba/samba4/prefix/private/sam.ldb which allows us to test putting the sam on an ldap server using our own ldap server. This is a great stress test for the ldap code. (This used to be commit 40948ba3848e2cfd69ee5ef77031170a652e389b)
Diffstat (limited to 'source4/ldap_server/ldap_hacked_ldb.c')
-rw-r--r--source4/ldap_server/ldap_hacked_ldb.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source4/ldap_server/ldap_hacked_ldb.c b/source4/ldap_server/ldap_hacked_ldb.c
index e0056775b9..c7a5f6d1a2 100644
--- a/source4/ldap_server/ldap_hacked_ldb.c
+++ b/source4/ldap_server/ldap_hacked_ldb.c
@@ -461,7 +461,7 @@ queue_reply2:
}
static NTSTATUS hldb_Search(struct ldapsrv_partition *partition, struct ldapsrv_call *call,
- struct ldap_SearchRequest *r)
+ struct ldap_SearchRequest *r)
{
NTSTATUS status;
void *local_ctx;
@@ -481,7 +481,7 @@ static NTSTATUS hldb_Search(struct ldapsrv_partition *partition, struct ldapsrv_
local_ctx = talloc_named(call, 0, "hldb_Search local memory context");
NT_STATUS_HAVE_NO_MEMORY(local_ctx);
- samdb = samdb_connect(local_ctx);
+ samdb = ldapsrv_sam_connect(call);
NT_STATUS_HAVE_NO_MEMORY(samdb);
status = hacked_Search(partition, call, r, samdb);
@@ -618,7 +618,7 @@ static NTSTATUS hldb_Add(struct ldapsrv_partition *partition, struct ldapsrv_cal
local_ctx = talloc_named(call, 0, "hldb_Add local memory context");
NT_STATUS_HAVE_NO_MEMORY(local_ctx);
- samdb = samdb_connect(local_ctx);
+ samdb = ldapsrv_sam_connect(call);
NT_STATUS_HAVE_NO_MEMORY(samdb);
dn = ldap_parse_dn(local_ctx, r->dn);
@@ -717,7 +717,7 @@ static NTSTATUS hldb_Del(struct ldapsrv_partition *partition, struct ldapsrv_cal
local_ctx = talloc_named(call, 0, "hldb_Del local memory context");
NT_STATUS_HAVE_NO_MEMORY(local_ctx);
- samdb = samdb_connect(local_ctx);
+ samdb = ldapsrv_sam_connect(call);
NT_STATUS_HAVE_NO_MEMORY(samdb);
dn = ldap_parse_dn(local_ctx, r->dn);
@@ -772,7 +772,7 @@ static NTSTATUS hldb_Modify(struct ldapsrv_partition *partition, struct ldapsrv_
local_ctx = talloc_named(call, 0, "hldb_Modify local memory context");
NT_STATUS_HAVE_NO_MEMORY(local_ctx);
- samdb = samdb_connect(local_ctx);
+ samdb = ldapsrv_sam_connect(call);
NT_STATUS_HAVE_NO_MEMORY(samdb);
dn = ldap_parse_dn(local_ctx, r->dn);
@@ -889,7 +889,7 @@ static NTSTATUS hldb_Compare(struct ldapsrv_partition *partition, struct ldapsrv
local_ctx = talloc_named(call, 0, "hldb_Compare local_memory_context");
NT_STATUS_HAVE_NO_MEMORY(local_ctx);
- samdb = samdb_connect(local_ctx);
+ samdb = ldapsrv_sam_connect(call);
NT_STATUS_HAVE_NO_MEMORY(samdb);
dn = ldap_parse_dn(local_ctx, r->dn);
@@ -957,7 +957,7 @@ static NTSTATUS hldb_ModifyDN(struct ldapsrv_partition *partition, struct ldapsr
local_ctx = talloc_named(call, 0, "hldb_ModifyDN local memory context");
NT_STATUS_HAVE_NO_MEMORY(local_ctx);
- samdb = samdb_connect(local_ctx);
+ samdb = ldapsrv_sam_connect(call);
NT_STATUS_HAVE_NO_MEMORY(samdb);
olddn = ldap_parse_dn(local_ctx, r->dn);