From: Christof Schmitt Date: Fri, 5 Mar 2021 22:48:29 +0000 (-0700) Subject: winbind: Only use unixid2sid mapping when module reports ID_MAPPED X-Git-Tag: tevent-0.11.0~1599 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db2afa57e4aa926b478db1be4d693edbdf4d2a23;p=thirdparty%2Fsamba.git winbind: Only use unixid2sid mapping when module reports ID_MAPPED Only consider a mapping to be valid when the idmap module reports ID_MAPPED. Otherwise return the null SID. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14663 Signed-off-by: Christof Schmitt Reviewed-by: Volker Lendecke --- diff --git a/source3/winbindd/winbindd_dual_srv.c b/source3/winbindd/winbindd_dual_srv.c index ffd7bb957b2..8a0301bf2d6 100644 --- a/source3/winbindd/winbindd_dual_srv.c +++ b/source3/winbindd/winbindd_dual_srv.c @@ -283,8 +283,10 @@ NTSTATUS _wbint_UnixIDs2Sids(struct pipes_struct *p, } for (i=0; iin.num_ids; i++) { - r->out.xids[i] = maps[i]->xid; - sid_copy(&r->out.sids[i], maps[i]->sid); + if (maps[i]->status == ID_MAPPED) { + r->out.xids[i] = maps[i]->xid; + sid_copy(&r->out.sids[i], maps[i]->sid); + } } TALLOC_FREE(maps);