summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-09-05 16:42:09 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-09-05 11:19:25 +0200
commit843de63fa547601bc7ab0f4b3a57022720c83c61 (patch)
tree315634b3fb9cbf192cad875f225cd6c217f66f62
parent3fbdd3fa0164814b74409a11e67b3b708bb2a458 (diff)
downloadsamba-843de63fa547601bc7ab0f4b3a57022720c83c61.tar.gz
samba-843de63fa547601bc7ab0f4b3a57022720c83c61.tar.bz2
samba-843de63fa547601bc7ab0f4b3a57022720c83c61.zip
s4-cldap: fixed cldap search based on dom_sid
we were not filling in the sid pointer correctly for the ldb_search Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
-rw-r--r--source4/cldap_server/netlogon.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/source4/cldap_server/netlogon.c b/source4/cldap_server/netlogon.c
index 77f50ff3e6..c9c92f6343 100644
--- a/source4/cldap_server/netlogon.c
+++ b/source4/cldap_server/netlogon.c
@@ -134,22 +134,11 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx,
"(&(objectCategory=DomainDNS)(objectGUID=%s))",
ldb_binary_encode(mem_ctx, guid_val));
} else { /* domain_sid case */
- struct dom_sid *sid;
- struct ldb_val sid_val;
- enum ndr_err_code ndr_err;
-
- /* Rather than go via the string, just push into the NDR form */
- ndr_err = ndr_push_struct_blob(&sid_val, mem_ctx, &sid,
- (ndr_push_flags_fn_t)ndr_push_dom_sid);
- if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
- return NT_STATUS_INVALID_PARAMETER;
- }
-
ret = ldb_search(sam_ctx, mem_ctx, &dom_res,
- NULL, LDB_SCOPE_SUBTREE,
- dom_attrs,
- "(&(objectCategory=DomainDNS)(objectSid=%s))",
- ldb_binary_encode(mem_ctx, sid_val));
+ NULL, LDB_SCOPE_SUBTREE,
+ dom_attrs,
+ "(&(objectCategory=DomainDNS)(objectSid=%s))",
+ dom_sid_string(mem_ctx, domain_sid));
}
if (ret != LDB_SUCCESS) {