From 33cbe9c6310a7853a0189cd17b0f6c26f208cf16 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 10 Dec 2009 14:31:52 +1100 Subject: s4-server: use GUID_to_ndr_blob() in cldap and smb servers --- source4/cldap_server/netlogon.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'source4/cldap_server') diff --git a/source4/cldap_server/netlogon.c b/source4/cldap_server/netlogon.c index 049b0085b3..7072953121 100644 --- a/source4/cldap_server/netlogon.c +++ b/source4/cldap_server/netlogon.c @@ -104,7 +104,6 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx, if (domain_guid) { struct GUID binary_guid; struct ldb_val guid_val; - enum ndr_err_code ndr_err; /* By this means, we ensure we don't have funny stuff in the GUID */ @@ -114,10 +113,9 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx, } /* And this gets the result into the binary format we want anyway */ - ndr_err = ndr_push_struct_blob(&guid_val, mem_ctx, NULL, &binary_guid, - (ndr_push_flags_fn_t)ndr_push_GUID); - if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { - return NT_STATUS_INVALID_PARAMETER; + status = GUID_to_ndr_blob(&binary_guid, mem_ctx, &guid_val); + if (!NT_STATUS_IS_OK(status)) { + return status; } ret = ldb_search(sam_ctx, mem_ctx, &dom_res, NULL, LDB_SCOPE_SUBTREE, -- cgit