From: Stefan Metzmacher Date: Wed, 22 Jan 2020 17:00:07 +0000 (+0000) Subject: winbindd: handling missing idmap in getgrgid() X-Git-Tag: ldb-2.1.1~180 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d0bda9467ac3f45f85f48a281cdb173ce1064eb;p=thirdparty%2Fsamba.git winbindd: handling missing idmap in getgrgid() A similar hunk was added via commit 89f753c1fc824fef29aebb7d783ab7e09cd1f04e ("winbind: Use xids2sids in getpwuid"), but it was missing in commit e2dda192e7f8b65a5f02120be56cf0f07d03679f ("winbind: Use xids2sids in getgrgid") BUG: https://bugzilla.samba.org/show_bug.cgi?id=14265 Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Wed Feb 5 17:56:58 UTC 2020 on sn-devel-184 --- diff --git a/source3/winbindd/winbindd_getgrgid.c b/source3/winbindd/winbindd_getgrgid.c index aa99e6e2561..24d70161770 100644 --- a/source3/winbindd/winbindd_getgrgid.c +++ b/source3/winbindd/winbindd_getgrgid.c @@ -79,6 +79,10 @@ static void winbindd_getgrgid_gid2sid_done(struct tevent_req *subreq) if (tevent_req_nterror(req, status)) { return; } + if (is_null_sid(state->sid)) { + tevent_req_nterror(req, NT_STATUS_NO_SUCH_GROUP); + return; + } subreq = wb_getgrsid_send(state, state->ev, state->sid, lp_winbind_expand_groups());