diff options
Diffstat (limited to 'source4/libnet')
-rw-r--r-- | source4/libnet/libnet_become_dc.c | 6 | ||||
-rw-r--r-- | source4/libnet/libnet_samsync_ldb.c | 10 |
2 files changed, 7 insertions, 9 deletions
diff --git a/source4/libnet/libnet_become_dc.c b/source4/libnet/libnet_become_dc.c index e2336650e7..f64ef6f8dd 100644 --- a/source4/libnet/libnet_become_dc.c +++ b/source4/libnet/libnet_become_dc.c @@ -1939,6 +1939,7 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s) struct drsuapi_DsAttributeValue *vs; DATA_BLOB *vd; const struct GUID *v; + NTSTATUS status; vs = talloc_array(attrs, struct drsuapi_DsAttributeValue, 1); if (composite_nomem(vs, c)) return; @@ -1948,9 +1949,8 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s) v = &s->dest_dsa.invocation_id; - ndr_err = ndr_push_struct_blob(&vd[0], vd, iconv_convenience, v, (ndr_push_flags_fn_t)ndr_push_GUID); - if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { - c->status = ndr_map_error2ntstatus(ndr_err); + c->status = GUID_to_ndr_blob(v, vd, &vd[0]); + if (!NT_STATUS_IS_OK(status)) { if (!composite_is_ok(c)) return; } diff --git a/source4/libnet/libnet_samsync_ldb.c b/source4/libnet/libnet_samsync_ldb.c index 4cd23cd8ed..e7066ecfd2 100644 --- a/source4/libnet/libnet_samsync_ldb.c +++ b/source4/libnet/libnet_samsync_ldb.c @@ -166,14 +166,12 @@ static NTSTATUS samsync_ldb_handle_domain(TALLOC_CTX *mem_ctx, } if (state->samsync_state->domain_guid) { - enum ndr_err_code ndr_err; struct ldb_val v; - ndr_err = ndr_push_struct_blob(&v, msg, NULL, - state->samsync_state->domain_guid, - (ndr_push_flags_fn_t)ndr_push_GUID); - if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + NTSTATUS status; + status = GUID_to_ndr_blob(state->samsync_state->domain_guid, msg, &v); + if (!NT_STATUS_IS_OK(status)) { *error_string = talloc_asprintf(mem_ctx, "ndr_push of domain GUID failed!"); - return ndr_map_error2ntstatus(ndr_err); + return status; } ldb_msg_add_value(msg, "objectGUID", &v, NULL); |