diff options
author | Amitay Isaacs <amitay@gmail.com> | 2011-08-12 15:45:43 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-08-13 12:30:50 +1000 |
commit | 6a18664d511ac77bde3df040e3c95ffef385c186 (patch) | |
tree | 02870a27af843e7beb3575356e0d0a5935f0200d /source3 | |
parent | d7ab07e86f421de1cb4dbd3905ec2567f0e34c1b (diff) | |
download | samba-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')
-rw-r--r-- | source3/passdb/pdb_samba4.c | 10 |
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")); |