diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-12-07 15:33:24 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:28:58 -0500 |
commit | 3aedc80896f1f71e218080b93fd92751f5e88550 (patch) | |
tree | 2287e26f6797b0b760bd837f3d020160de50c3aa /source4 | |
parent | 81a3bd7bc840e71072695ca3b77d59de2543846f (diff) | |
download | samba-3aedc80896f1f71e218080b93fd92751f5e88550.tar.gz samba-3aedc80896f1f71e218080b93fd92751f5e88550.tar.bz2 samba-3aedc80896f1f71e218080b93fd92751f5e88550.zip |
r20067: use a global zero_sid
metze
(This used to be commit 5ebf76d23e9f51672a5bf3dceffe20513f0bd070)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/libnet/libnet_become_dc.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/source4/libnet/libnet_become_dc.c b/source4/libnet/libnet_become_dc.c index 7f2d64b3d3..917c124dab 100644 --- a/source4/libnet/libnet_become_dc.c +++ b/source4/libnet/libnet_become_dc.c @@ -35,6 +35,8 @@ struct libnet_BecomeDC_state { struct libnet_context *libnet; + struct dom_sid zero_sid; + struct { struct cldap_socket *sock; struct cldap_netlogon io; @@ -1023,9 +1025,6 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s) struct drsuapi_DsReplicaObjectIdentifier *identifier; uint32_t num_attrs, i = 0; struct drsuapi_DsReplicaAttribute *attrs; - struct dom_sid zero_sid; - - ZERO_STRUCT(zero_sid); /* choose a random invocationId */ s->dest_dsa.invocation_id = GUID_random(); @@ -1037,7 +1036,7 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s) identifier = talloc(r, struct drsuapi_DsReplicaObjectIdentifier); if (composite_nomem(identifier, c)) return; identifier->guid = GUID_zero(); - identifier->sid = zero_sid; + identifier->sid = s->zero_sid; identifier->dn = talloc_asprintf(identifier, "CN=NTDS Settings,%s", s->dest_dsa.server_dn_str); if (composite_nomem(identifier->dn, c)) return; @@ -1152,7 +1151,7 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s) /* value for nTDSDSA */ v[0].guid = GUID_zero(); - v[0].sid = zero_sid; + v[0].sid = s->zero_sid; v[0].dn = talloc_asprintf(v, "CN=NTDS-DSA,%s", s->forest.schema_dn_str); if (composite_nomem(v->dn, c)) return; @@ -1201,15 +1200,15 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s) if (composite_nomem(v, c)) return; v[0].guid = GUID_zero(); - v[0].sid = zero_sid; + v[0].sid = s->zero_sid; v[0].dn = s->forest.config_dn_str; v[1].guid = GUID_zero(); - v[1].sid = zero_sid; + v[1].sid = s->zero_sid; v[1].dn = s->domain.dn_str; v[2].guid = GUID_zero(); - v[2].sid = zero_sid; + v[2].sid = s->zero_sid; v[2].dn = s->forest.schema_dn_str; vs[0].object = &v[0]; @@ -1235,15 +1234,15 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s) if (composite_nomem(v, c)) return; v[0].guid = GUID_zero(); - v[0].sid = zero_sid; + v[0].sid = s->zero_sid; v[0].dn = s->forest.config_dn_str; v[1].guid = GUID_zero(); - v[1].sid = zero_sid; + v[1].sid = s->zero_sid; v[1].dn = s->domain.dn_str; v[2].guid = GUID_zero(); - v[2].sid = zero_sid; + v[2].sid = s->zero_sid; v[2].dn = s->forest.schema_dn_str; vs[0].object = &v[0]; @@ -1269,7 +1268,7 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s) if (composite_nomem(v, c)) return; v[0].guid = GUID_zero(); - v[0].sid = zero_sid; + v[0].sid = s->zero_sid; v[0].dn = s->forest.schema_dn_str; vs[0].object = &v[0]; @@ -1293,7 +1292,7 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s) if (composite_nomem(v, c)) return; v[0].guid = GUID_zero(); - v[0].sid = zero_sid; + v[0].sid = s->zero_sid; v[0].dn = s->domain.dn_str; vs[0].object = &v[0]; @@ -1361,7 +1360,7 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s) if (composite_nomem(v, c)) return; v[0].guid = GUID_zero(); - v[0].sid = zero_sid; + v[0].sid = s->zero_sid; v[0].dn = s->dest_dsa.computer_dn_str; vs[0].object = &v[0]; |