All we need from the domain struct is it's sid. Directly use it.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
if (tevent_req_nterror(req, status)) {
return;
}
- domain = find_domain_from_sid_noinit(get_global_sam_sid());
- if (domain == NULL) {
- tevent_req_nterror(req, NT_STATUS_INTERNAL_ERROR);
- return;
- }
if (!wb_add_rids_to_sids(state, &state->num_sids, &state->sids,
- &domain->sid, num_rids, rids)) {
+ get_global_sam_sid(), num_rids, rids)) {
tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
return;
}