summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2009-10-27 14:59:28 -0500
committerAndrew Bartlett <abartlet@samba.org>2009-11-02 16:36:54 +1100
commit40a06c0101bf6426e0752cd695044049a8058f54 (patch)
treeaa2ed12cddf54dc17357c48a88d2ff3b6d701b6c /source4/dsdb
parentbf01937549cd1ebaf327a709ecb104bfc0e0705c (diff)
downloadsamba-40a06c0101bf6426e0752cd695044049a8058f54.tar.gz
samba-40a06c0101bf6426e0752cd695044049a8058f54.tar.bz2
samba-40a06c0101bf6426e0752cd695044049a8058f54.zip
s4:dsdb - Removed redundant domain SID filter.
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/password_hash.c30
1 files changed, 1 insertions, 29 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c
index a3ff5f87d9..7779a1752b 100644
--- a/source4/dsdb/samdb/ldb_modules/password_hash.c
+++ b/source4/dsdb/samdb/ldb_modules/password_hash.c
@@ -79,7 +79,6 @@ struct ph_context {
struct ldb_reply *search_res;
- struct dom_sid *domain_sid;
struct domain_data *domain;
};
@@ -1637,22 +1636,13 @@ static int build_domain_data_request(struct ph_context *ac)
otherwise the compiler can put it on the stack */
struct ldb_context *ldb;
static const char * const attrs[] = { "pwdProperties", "pwdHistoryLength", NULL };
- char *filter;
ldb = ldb_module_get_ctx(ac->module);
- filter = talloc_asprintf(ac,
- "(objectSid=%s)",
- ldap_encode_ndr_dom_sid(ac, ac->domain_sid));
- if (filter == NULL) {
- ldb_oom(ldb);
- return LDB_ERR_OPERATIONS_ERROR;
- }
-
return ldb_build_search_req(&ac->dom_req, ldb, ac,
ldb_get_default_basedn(ldb),
LDB_SCOPE_BASE,
- filter, attrs,
+ NULL, attrs,
NULL,
ac, get_domain_data_callback,
ac->req);
@@ -1757,13 +1747,6 @@ static int password_hash_add(struct ldb_module *module, struct ldb_request *req)
}
/* get user domain data */
- ac->domain_sid = samdb_result_sid_prefix(ac, req->op.add.message, "objectSid");
- if (ac->domain_sid == NULL) {
- ldb_debug(ldb, LDB_DEBUG_ERROR,
- "can't handle entry with missing objectSid!\n");
- return LDB_ERR_OPERATIONS_ERROR;
- }
-
ret = build_domain_data_request(ac);
if (ret != LDB_SUCCESS) {
return ret;
@@ -2052,17 +2035,6 @@ static int ph_mod_search_callback(struct ldb_request *req, struct ldb_reply *are
case LDB_REPLY_DONE:
- /* get object domain sid */
- ac->domain_sid = samdb_result_sid_prefix(ac,
- ac->search_res->message,
- "objectSid");
- if (ac->domain_sid == NULL) {
- ldb_debug(ldb, LDB_DEBUG_ERROR,
- "can't handle entry without objectSid!\n");
- return ldb_module_done(ac->req, NULL, NULL,
- LDB_ERR_OPERATIONS_ERROR);
- }
-
/* get user domain data */
ret = build_domain_data_request(ac);
if (ret != LDB_SUCCESS) {