summaryrefslogtreecommitdiff
path: root/source4/libnet
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-01-03 09:58:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:36:01 -0500
commit536ca21c55643a06e53053c2576697bf6abef2b0 (patch)
tree47ceb3c8cddfbdee09b25ef8f96395dd9ab4ac8f /source4/libnet
parentd1e3dccab64712cc219bb5c6892cb0d243d109fc (diff)
downloadsamba-536ca21c55643a06e53053c2576697bf6abef2b0.tar.gz
samba-536ca21c55643a06e53053c2576697bf6abef2b0.tar.bz2
samba-536ca21c55643a06e53053c2576697bf6abef2b0.zip
r20504: we handle the attribute values always as DATA_BLOB's and
don't need the union with the attribute id as switch anymore metze (This used to be commit d47c81923d0731edd314215c6f0b2eb3d1ee252d)
Diffstat (limited to 'source4/libnet')
-rw-r--r--source4/libnet/libnet_become_dc.c140
1 files changed, 70 insertions, 70 deletions
diff --git a/source4/libnet/libnet_become_dc.c b/source4/libnet/libnet_become_dc.c
index f6eeb470f3..c5e959f309 100644
--- a/source4/libnet/libnet_become_dc.c
+++ b/source4/libnet/libnet_become_dc.c
@@ -1053,13 +1053,13 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s)
/* ntSecurityDescriptor */
{
- struct drsuapi_DsAttributeValueDataBlob *vs;
+ struct drsuapi_DsAttributeValue *vs;
DATA_BLOB *vd;
struct security_descriptor *v;
struct dom_sid *domain_admins_sid;
const char *domain_admins_sid_str;
- vs = talloc_array(attrs, struct drsuapi_DsAttributeValueDataBlob, 1);
+ vs = talloc_array(attrs, struct drsuapi_DsAttributeValue, 1);
if (composite_nomem(vs, c)) return;
vd = talloc_array(vs, DATA_BLOB, 1);
@@ -1118,21 +1118,21 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s)
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];
+ vs[0].blob = &vd[0];
- attrs[i].attid = DRSUAPI_ATTRIBUTE_ntSecurityDescriptor;
- attrs[i].value_ctr.data_blob.num_values = 1;
- attrs[i].value_ctr.data_blob.values = vs;
+ attrs[i].attid = DRSUAPI_ATTRIBUTE_ntSecurityDescriptor;
+ attrs[i].value_ctr.num_values = 1;
+ attrs[i].value_ctr.values = vs;
i++;
}
/* objectClass: nTDSDSA */
{
- struct drsuapi_DsAttributeValueDataBlob *vs;
+ struct drsuapi_DsAttributeValue *vs;
DATA_BLOB *vd;
- vs = talloc_array(attrs, struct drsuapi_DsAttributeValueDataBlob, 1);
+ vs = talloc_array(attrs, struct drsuapi_DsAttributeValue, 1);
if (composite_nomem(vs, c)) return;
vd = talloc_array(vs, DATA_BLOB, 1);
@@ -1144,22 +1144,22 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s)
/* value for nTDSDSA */
SIVAL(vd[0].data, 0, 0x0017002F);
- vs[0].data = &vd[0];
+ vs[0].blob = &vd[0];
- attrs[i].attid = DRSUAPI_ATTRIBUTE_objectClass;
- attrs[i].value_ctr.data_blob.num_values = 1;
- attrs[i].value_ctr.data_blob.values = vs;
+ attrs[i].attid = DRSUAPI_ATTRIBUTE_objectClass;
+ attrs[i].value_ctr.num_values = 1;
+ attrs[i].value_ctr.values = vs;
i++;
}
/* objectCategory: CN=NTDS-DSA,CN=Schema,... */
{
- struct drsuapi_DsAttributeValueDataBlob *vs;
+ struct drsuapi_DsAttributeValue *vs;
DATA_BLOB *vd;
struct drsuapi_DsReplicaObjectIdentifier3 v[1];
- vs = talloc_array(attrs, struct drsuapi_DsAttributeValueDataBlob, 1);
+ vs = talloc_array(attrs, struct drsuapi_DsAttributeValue, 1);
if (composite_nomem(vs, c)) return;
vd = talloc_array(vs, DATA_BLOB, 1);
@@ -1175,22 +1175,22 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s)
(ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
if (!composite_is_ok(c)) return;
- vs[0].data = &vd[0];
+ vs[0].blob = &vd[0];
- attrs[i].attid = DRSUAPI_ATTRIBUTE_objectCategory;
- attrs[i].value_ctr.data_blob.num_values = 1;
- attrs[i].value_ctr.data_blob.values = vs;
+ attrs[i].attid = DRSUAPI_ATTRIBUTE_objectCategory;
+ attrs[i].value_ctr.num_values = 1;
+ attrs[i].value_ctr.values = vs;
i++;
}
/* invocationId: random guid */
{
- struct drsuapi_DsAttributeValueDataBlob *vs;
+ struct drsuapi_DsAttributeValue *vs;
DATA_BLOB *vd;
const struct GUID *v;
- vs = talloc_array(attrs, struct drsuapi_DsAttributeValueDataBlob, 1);
+ vs = talloc_array(attrs, struct drsuapi_DsAttributeValue, 1);
if (composite_nomem(vs, c)) return;
vd = talloc_array(vs, DATA_BLOB, 1);
@@ -1201,22 +1201,22 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s)
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];
+ vs[0].blob = &vd[0];
- attrs[i].attid = DRSUAPI_ATTRIBUTE_invocationId;
- attrs[i].value_ctr.data_blob.num_values = 1;
- attrs[i].value_ctr.data_blob.values = vs;
+ attrs[i].attid = DRSUAPI_ATTRIBUTE_invocationId;
+ attrs[i].value_ctr.num_values = 1;
+ attrs[i].value_ctr.values = vs;
i++;
}
/* hasMasterNCs: ... */
{
- struct drsuapi_DsAttributeValueDataBlob *vs;
+ struct drsuapi_DsAttributeValue *vs;
DATA_BLOB *vd;
struct drsuapi_DsReplicaObjectIdentifier3 v[3];
- vs = talloc_array(attrs, struct drsuapi_DsAttributeValueDataBlob, 3);
+ vs = talloc_array(attrs, struct drsuapi_DsAttributeValue, 3);
if (composite_nomem(vs, c)) return;
vd = talloc_array(vs, DATA_BLOB, 3);
@@ -1246,24 +1246,24 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s)
(ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
if (!composite_is_ok(c)) return;
- vs[0].data = &vd[0];
- vs[1].data = &vd[1];
- vs[2].data = &vd[2];
+ vs[0].blob = &vd[0];
+ vs[1].blob = &vd[1];
+ vs[2].blob = &vd[2];
- attrs[i].attid = DRSUAPI_ATTRIBUTE_hasMasterNCs;
- attrs[i].value_ctr.data_blob.num_values = 3;
- attrs[i].value_ctr.data_blob.values = vs;
+ attrs[i].attid = DRSUAPI_ATTRIBUTE_hasMasterNCs;
+ attrs[i].value_ctr.num_values = 3;
+ attrs[i].value_ctr.values = vs;
i++;
}
/* msDS-hasMasterNCs: ... */
if (w2k3) {
- struct drsuapi_DsAttributeValueDataBlob *vs;
+ struct drsuapi_DsAttributeValue *vs;
DATA_BLOB *vd;
struct drsuapi_DsReplicaObjectIdentifier3 v[3];
- vs = talloc_array(attrs, struct drsuapi_DsAttributeValueDataBlob, 3);
+ vs = talloc_array(attrs, struct drsuapi_DsAttributeValue, 3);
if (composite_nomem(vs, c)) return;
vd = talloc_array(vs, DATA_BLOB, 3);
@@ -1293,24 +1293,24 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s)
(ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
if (!composite_is_ok(c)) return;
- vs[0].data = &vd[0];
- vs[1].data = &vd[1];
- vs[2].data = &vd[2];
+ vs[0].blob = &vd[0];
+ vs[1].blob = &vd[1];
+ vs[2].blob = &vd[2];
- attrs[i].attid = DRSUAPI_ATTRIBUTE_msDS_hasMasterNCs;
- attrs[i].value_ctr.data_blob.num_values = 3;
- attrs[i].value_ctr.data_blob.values = vs;
+ attrs[i].attid = DRSUAPI_ATTRIBUTE_msDS_hasMasterNCs;
+ attrs[i].value_ctr.num_values = 3;
+ attrs[i].value_ctr.values = vs;
i++;
}
/* dMDLocation: CN=Schema,... */
{
- struct drsuapi_DsAttributeValueDataBlob *vs;
+ struct drsuapi_DsAttributeValue *vs;
DATA_BLOB *vd;
struct drsuapi_DsReplicaObjectIdentifier3 v[1];
- vs = talloc_array(attrs, struct drsuapi_DsAttributeValueDataBlob, 1);
+ vs = talloc_array(attrs, struct drsuapi_DsAttributeValue, 1);
if (composite_nomem(vs, c)) return;
vd = talloc_array(vs, DATA_BLOB, 1);
@@ -1324,22 +1324,22 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s)
(ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
if (!composite_is_ok(c)) return;
- vs[0].data = &vd[0];
+ vs[0].blob = &vd[0];
- attrs[i].attid = DRSUAPI_ATTRIBUTE_dMDLocation;
- attrs[i].value_ctr.data_blob.num_values = 1;
- attrs[i].value_ctr.data_blob.values = vs;
+ attrs[i].attid = DRSUAPI_ATTRIBUTE_dMDLocation;
+ attrs[i].value_ctr.num_values = 1;
+ attrs[i].value_ctr.values = vs;
i++;
}
/* msDS-HasDomainNCs: <domain_partition> */
if (w2k3) {
- struct drsuapi_DsAttributeValueDataBlob *vs;
+ struct drsuapi_DsAttributeValue *vs;
DATA_BLOB *vd;
struct drsuapi_DsReplicaObjectIdentifier3 v[1];
- vs = talloc_array(attrs, struct drsuapi_DsAttributeValueDataBlob, 1);
+ vs = talloc_array(attrs, struct drsuapi_DsAttributeValue, 1);
if (composite_nomem(vs, c)) return;
vd = talloc_array(vs, DATA_BLOB, 1);
@@ -1353,21 +1353,21 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s)
(ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
if (!composite_is_ok(c)) return;
- vs[0].data = &vd[0];
+ vs[0].blob = &vd[0];
- attrs[i].attid = DRSUAPI_ATTRIBUTE_msDS_HasDomainNCs;
- attrs[i].value_ctr.data_blob.num_values = 1;
- attrs[i].value_ctr.data_blob.values = vs;
+ attrs[i].attid = DRSUAPI_ATTRIBUTE_msDS_HasDomainNCs;
+ attrs[i].value_ctr.num_values = 1;
+ attrs[i].value_ctr.values = vs;
i++;
}
/* msDS-Behavior-Version */
if (w2k3) {
- struct drsuapi_DsAttributeValueDataBlob *vs;
+ struct drsuapi_DsAttributeValue *vs;
DATA_BLOB *vd;
- vs = talloc_array(attrs, struct drsuapi_DsAttributeValueDataBlob, 1);
+ vs = talloc_array(attrs, struct drsuapi_DsAttributeValue, 1);
if (composite_nomem(vs, c)) return;
vd = talloc_array(vs, DATA_BLOB, 1);
@@ -1378,21 +1378,21 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s)
SIVAL(vd[0].data, 0, DS_BEHAVIOR_WIN2003);
- vs[0].data = &vd[0];
+ vs[0].blob = &vd[0];
- attrs[i].attid = DRSUAPI_ATTRIBUTE_msDS_Behavior_Version;
- attrs[i].value_ctr.data_blob.num_values = 1;
- attrs[i].value_ctr.data_blob.values = vs;
+ attrs[i].attid = DRSUAPI_ATTRIBUTE_msDS_Behavior_Version;
+ attrs[i].value_ctr.num_values = 1;
+ attrs[i].value_ctr.values = vs;
i++;
}
/* systemFlags */
{
- struct drsuapi_DsAttributeValueDataBlob *vs;
+ struct drsuapi_DsAttributeValue *vs;
DATA_BLOB *vd;
- vs = talloc_array(attrs, struct drsuapi_DsAttributeValueDataBlob, 1);
+ vs = talloc_array(attrs, struct drsuapi_DsAttributeValue, 1);
if (composite_nomem(vs, c)) return;
vd = talloc_array(vs, DATA_BLOB, 1);
@@ -1403,22 +1403,22 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s)
SIVAL(vd[0].data, 0, SYSTEM_FLAG_DISALLOW_MOVE_ON_DELETE);
- vs[0].data = &vd[0];
+ vs[0].blob = &vd[0];
- attrs[i].attid = DRSUAPI_ATTRIBUTE_systemFlags;
- attrs[i].value_ctr.data_blob.num_values = 1;
- attrs[i].value_ctr.data_blob.values = vs;
+ attrs[i].attid = DRSUAPI_ATTRIBUTE_systemFlags;
+ attrs[i].value_ctr.num_values = 1;
+ attrs[i].value_ctr.values = vs;
i++;
}
/* serverReference: ... */
{
- struct drsuapi_DsAttributeValueDataBlob *vs;
+ struct drsuapi_DsAttributeValue *vs;
DATA_BLOB *vd;
struct drsuapi_DsReplicaObjectIdentifier3 v[1];
- vs = talloc_array(attrs, struct drsuapi_DsAttributeValueDataBlob, 1);
+ vs = talloc_array(attrs, struct drsuapi_DsAttributeValue, 1);
if (composite_nomem(vs, c)) return;
vd = talloc_array(vs, DATA_BLOB, 1);
@@ -1432,11 +1432,11 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s)
(ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
if (!composite_is_ok(c)) return;
- vs[0].data = &vd[0];
+ vs[0].blob = &vd[0];
- attrs[i].attid = DRSUAPI_ATTRIBUTE_serverReference;
- attrs[i].value_ctr.data_blob.num_values = 1;
- attrs[i].value_ctr.data_blob.values = vs;
+ attrs[i].attid = DRSUAPI_ATTRIBUTE_serverReference;
+ attrs[i].value_ctr.num_values = 1;
+ attrs[i].value_ctr.values = vs;
i++;
}