summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2011-08-12 15:45:43 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-08-13 12:30:50 +1000
commit6a18664d511ac77bde3df040e3c95ffef385c186 (patch)
tree02870a27af843e7beb3575356e0d0a5935f0200d /source3/passdb
parentd7ab07e86f421de1cb4dbd3905ec2567f0e34c1b (diff)
downloadsamba-6a18664d511ac77bde3df040e3c95ffef385c186.tar.gz
samba-6a18664d511ac77bde3df040e3c95ffef385c186.tar.bz2
samba-6a18664d511ac77bde3df040e3c95ffef385c186.zip
s3-passdb: Connect to specified samdb if location is provided, otherwise use default
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/pdb_samba4.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source3/passdb/pdb_samba4.c b/source3/passdb/pdb_samba4.c
index ed27501b4d..ae38133e20 100644
--- a/source3/passdb/pdb_samba4.c
+++ b/source3/passdb/pdb_samba4.c
@@ -2213,10 +2213,18 @@ static NTSTATUS pdb_init_samba4(struct pdb_methods **pdb_method,
goto nomem;
}
- state->ldb = samdb_connect(state,
+ if (location) {
+ state->ldb = samdb_connect_url(state,
+ state->ev,
+ state->lp_ctx,
+ system_session(state->lp_ctx),
+ 0, location);
+ } else {
+ state->ldb = samdb_connect(state,
state->ev,
state->lp_ctx,
system_session(state->lp_ctx), 0);
+ }
if (!state->ldb) {
DEBUG(0, ("samdb_connect failed\n"));