From 2754a73d221d13095a4228fede25ffc64134beb5 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 2 Jan 2007 13:54:37 +0000 Subject: r20475: remove special case for GUID values metze (This used to be commit b7ab1c0039cd8000861cd89ca072d9d2b0bbf9de) --- source4/libnet/libnet_become_dc.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'source4/libnet') diff --git a/source4/libnet/libnet_become_dc.c b/source4/libnet/libnet_become_dc.c index eb929d57e4..30fc1774d5 100644 --- a/source4/libnet/libnet_become_dc.c +++ b/source4/libnet/libnet_become_dc.c @@ -29,6 +29,7 @@ #include "dsdb/common/flags.h" #include "librpc/gen_ndr/ndr_drsuapi_c.h" #include "libcli/security/security.h" +#include "librpc/gen_ndr/ndr_misc.h" #include "librpc/gen_ndr/ndr_security.h" struct libnet_BecomeDC_state { @@ -1113,7 +1114,7 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s) NULL); if (composite_nomem(v, c)) return; - c->status = ndr_push_struct_blob(&vd[0], r, v,(ndr_push_flags_fn_t)ndr_push_security_descriptor); + c->status = ndr_push_struct_blob(&vd[0], vd, v,(ndr_push_flags_fn_t)ndr_push_security_descriptor); if (!composite_is_ok(c)) return; vs[0].data = &vd[0]; @@ -1176,22 +1177,26 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s) /* invocationId: random guid */ { - struct drsuapi_DsAttributeValueGUID *vs; - struct GUID *v; + struct drsuapi_DsAttributeValueDataBlob *vs; + DATA_BLOB *vd; + const struct GUID *v; - vs = talloc_array(attrs, struct drsuapi_DsAttributeValueGUID, 1); + vs = talloc_array(attrs, struct drsuapi_DsAttributeValueDataBlob, 1); if (composite_nomem(vs, c)) return; - v = talloc_array(vs, struct GUID, 1); - if (composite_nomem(v, c)) return; + vd = talloc_array(vs, DATA_BLOB, 1); + if (composite_nomem(vd, c)) return; - v[0] = s->dest_dsa.invocation_id; + v = &s->dest_dsa.invocation_id; - vs[0].guid = &v[0]; + c->status = ndr_push_struct_blob(&vd[0], vd, v, (ndr_push_flags_fn_t)ndr_push_GUID); + if (!composite_is_ok(c)) return; + + vs[0].data = &vd[0]; attrs[i].attid = DRSUAPI_ATTRIBUTE_invocationId; - attrs[i].value_ctr.guid.num_values = 1; - attrs[i].value_ctr.guid.values = vs; + attrs[i].value_ctr.data_blob.num_values = 1; + attrs[i].value_ctr.data_blob.values = vs; i++; } -- cgit