winbindd: remove fallback to lookupsid for unknown SIDs
authorRalph Boehme <slow@samba.org>
Fri, 24 Mar 2017 15:46:40 +0000 (16:46 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 11 Apr 2017 23:41:14 +0000 (01:41 +0200)
In wb_lookupsids_done() if a SID failed with lookupsids(), remove the
hokey retry via lookupsid().

The retry logic with going through the single sids lookup at the end
added a fake domain with an empty string. The wb_lookupsids caller
wb_sids2xids needed this, as it wasn't doing the needed error handling
itself. As wb_sids2xids has been fixed to cope, we can just fail the
lookupsids here.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/winbindd/wb_lookupsids.c

index dbb24fde0aa88a7482897f72e9b4f3dc5a364bc6..219afb38c92d6a50264354018b8e44139aa21737 100644 (file)
@@ -507,19 +507,8 @@ static void wb_lookupsids_done(struct tevent_req *subreq)
         */
 
        for (i=0; i<state->tmp_names.count; i++) {
-
                uint32_t res_sid_index = d->sid_indexes[i];
 
-               if (state->tmp_names.names[i].sid_type == SID_NAME_UNKNOWN) {
-                       /*
-                        * Make unknown SIDs go through
-                        * wb_lookupsid. This retries the forest root.
-                        */
-                       state->single_sids[state->num_single_sids] =
-                               res_sid_index;
-                       state->num_single_sids += 1;
-                       continue;
-               }
                if (!wb_lookupsids_move_name(
                            &state->tmp_domains, &state->tmp_names.names[i],
                            state->res_domains, state->res_names,