Changeset 745 for trunk/server/libcli/ldap/ldap_ndr.c
- Timestamp:
- Nov 27, 2012, 4:43:17 PM (13 years ago)
- Location:
- trunk/server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server
- Property svn:mergeinfo changed
/vendor/current merged: 581,587,591,594,597,600,615,618,740
- Property svn:mergeinfo changed
-
trunk/server/libcli/ldap/ldap_ndr.c
r414 r745 22 22 23 23 #include "includes.h" 24 #include "lib/ldb/include/ldb.h" 24 #if _SAMBA_BUILD_ == 3 25 #include "lib/ldb_compat.h" 26 #else 27 #include <ldb.h> 28 #endif 25 29 #include "librpc/gen_ndr/ndr_security.h" 26 30 #include "librpc/gen_ndr/ndr_misc.h" … … 48 52 enum ndr_err_code ndr_err; 49 53 char *ret; 50 ndr_err = ndr_push_struct_blob(&blob, mem_ctx, NULL,sid,54 ndr_err = ndr_push_struct_blob(&blob, mem_ctx, sid, 51 55 (ndr_push_flags_fn_t)ndr_push_dom_sid); 52 56 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { … … 62 66 encode a NDR GUID as a ldap filter element 63 67 */ 64 char *ldap_encode_ndr_GUID(TALLOC_CTX *mem_ctx, struct GUID *guid)68 char *ldap_encode_ndr_GUID(TALLOC_CTX *mem_ctx, const struct GUID *guid) 65 69 { 66 70 DATA_BLOB blob; 67 enum ndr_err_code ndr_err;71 NTSTATUS status; 68 72 char *ret; 69 ndr_err = ndr_push_struct_blob(&blob, mem_ctx, NULL, guid, 70 (ndr_push_flags_fn_t)ndr_push_GUID); 71 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { 73 status = GUID_to_ndr_blob(guid, mem_ctx, &blob); 74 if (!NT_STATUS_IS_OK(status)) { 72 75 return NULL; 73 76 } … … 87 90 blob.data = val.data; 88 91 blob.length = val.length; 89 ndr_err = ndr_pull_struct_blob(&blob, mem_ctx, NULL,guid,92 ndr_err = ndr_pull_struct_blob(&blob, mem_ctx, guid, 90 93 (ndr_pull_flags_fn_t)ndr_pull_GUID); 91 94 talloc_free(val.data);
Note:
See TracChangeset
for help on using the changeset viewer.