winbindd: don't split the rid for SID_NAME_DOMAIN sids in wb_lookupsids
authorStefan Metzmacher <metze@samba.org>
Tue, 23 Jan 2018 13:34:45 +0000 (14:34 +0100)
committerRalph Boehme <slow@samba.org>
Wed, 21 Feb 2018 13:19:17 +0000 (14:19 +0100)
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13279

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/winbindd/wb_lookupsids.c

index f2b2768bda681d0ecae01e5882b5433acd75671f..6a4ad68e38935bd3751321cda27a98ab0fc4d4db 100644 (file)
@@ -545,7 +545,9 @@ static void wb_lookupsids_single_done(struct tevent_req *subreq)
                 */
 
                sid_copy(&src_domain_sid, &state->sids[res_sid_index]);
-               sid_split_rid(&src_domain_sid, &src_rid);
+               if (type != SID_NAME_DOMAIN) {
+                       sid_split_rid(&src_domain_sid, &src_rid);
+               }
 
                src_domain.name.string = domain_name;
                src_domain.sid = &src_domain_sid;