diff options
author | Andrew Tridgell <tridge@samba.org> | 2011-08-19 17:27:14 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2011-08-25 07:39:37 +1000 |
commit | fb612af6553748ca725cfbb0d8c24948d10f47a2 (patch) | |
tree | 41a9f45eaa953a43c99e201e0a09280731204423 | |
parent | 4655a5bf7c875c9cd2e4c70362e0ecac8b8a0152 (diff) | |
download | samba-fb612af6553748ca725cfbb0d8c24948d10f47a2.tar.gz samba-fb612af6553748ca725cfbb0d8c24948d10f47a2.tar.bz2 samba-fb612af6553748ca725cfbb0d8c24948d10f47a2.zip |
pdb-samba4: use ldb_get_default_basedn() instead of NULL
this makes pdb-samba4 safe for multi-domain setups
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
-rw-r--r-- | source3/passdb/pdb_samba4.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/passdb/pdb_samba4.c b/source3/passdb/pdb_samba4.c index a45c68792e..7a1c6359a6 100644 --- a/source3/passdb/pdb_samba4.c +++ b/source3/passdb/pdb_samba4.c @@ -602,7 +602,7 @@ static NTSTATUS pdb_samba4_getsamupriv(struct pdb_samba4_state *state, "badPwdCount", "logonCount", "countryCode", "codePage", "unicodePwd", "dBCSPwd", NULL }; - int rc = dsdb_search_one(state->ldb, mem_ctx, msg, NULL, LDB_SCOPE_SUBTREE, attrs, 0, "%s", filter); + int rc = dsdb_search_one(state->ldb, mem_ctx, msg, ldb_get_default_basedn(state->ldb), LDB_SCOPE_SUBTREE, attrs, 0, "%s", filter); if (rc != LDB_SUCCESS) { DEBUG(10, ("ldap_search failed %s\n", ldb_errstring(state->ldb))); @@ -866,7 +866,7 @@ static NTSTATUS pdb_samba4_getgrfilter(struct pdb_methods *m, GROUP_MAP *map, return NT_STATUS_NO_MEMORY; } - rc = dsdb_search_one(state->ldb, tmp_ctx, &msg, NULL, LDB_SCOPE_SUBTREE, attrs, 0, "%s", expression); + rc = dsdb_search_one(state->ldb, tmp_ctx, &msg, ldb_get_default_basedn(state->ldb), LDB_SCOPE_SUBTREE, attrs, 0, "%s", expression); if (rc == LDB_ERR_NO_SUCH_OBJECT) { talloc_free(tmp_ctx); return NT_STATUS_NO_SUCH_GROUP; @@ -1825,7 +1825,7 @@ static bool pdb_samba4_search_filter(struct pdb_methods *m, return false; } - rc = dsdb_search(state->ldb, tmp_ctx, &res, NULL, LDB_SCOPE_SUBTREE, attrs, 0, "%s", expression); + rc = dsdb_search(state->ldb, tmp_ctx, &res, ldb_get_default_basedn(state->ldb), LDB_SCOPE_SUBTREE, attrs, 0, "%s", expression); if (rc != LDB_SUCCESS) { talloc_free(tmp_ctx); DEBUG(10, ("dsdb_search failed: %s\n", |