1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

s3-passdb: Connect to specified samdb if location is provided, otherwise use default

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Amitay Isaacs 2011-08-12 15:45:43 +10:00 committed by Andrew Bartlett
parent d7ab07e86f
commit 6a18664d51

View File

@ -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"));