summaryrefslogtreecommitdiff
path: root/source4/libnet
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-01-02 13:54:37 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:35:56 -0500
commit2754a73d221d13095a4228fede25ffc64134beb5 (patch)
treeda3b280036d7f566fd6aea3fe5714d50da484f93 /source4/libnet
parent04b9446b2a06362a85fde456fbb2fdc0ef3fd69e (diff)
downloadsamba-2754a73d221d13095a4228fede25ffc64134beb5.tar.gz
samba-2754a73d221d13095a4228fede25ffc64134beb5.tar.bz2
samba-2754a73d221d13095a4228fede25ffc64134beb5.zip
r20475: remove special case for GUID values
metze (This used to be commit b7ab1c0039cd8000861cd89ca072d9d2b0bbf9de)
Diffstat (limited to 'source4/libnet')
-rw-r--r--source4/libnet/libnet_become_dc.c25
1 files changed, 15 insertions, 10 deletions
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++;
}