From: Michael Adam Date: Thu, 6 Dec 2012 23:55:18 +0000 (+0100) Subject: s3:winbindd:getgrnam: also produce a group struct for a user with ID_TYPE_BOTH X-Git-Tag: tevent-0.9.18~362 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=40e3df7c37a15b28f170699ff9b8102416a9107f;p=thirdparty%2Fsamba.git s3:winbindd:getgrnam: also produce a group struct for a user with ID_TYPE_BOTH Signed-off-by: Michael Adam Reviewed-by: Stefan Metzmacher --- diff --git a/source3/winbindd/winbindd_getgrnam.c b/source3/winbindd/winbindd_getgrnam.c index 9a2f64e4ad0..bc970cbf226 100644 --- a/source3/winbindd/winbindd_getgrnam.c +++ b/source3/winbindd/winbindd_getgrnam.c @@ -101,8 +101,19 @@ static void winbindd_getgrnam_lookupname_done(struct tevent_req *subreq) return; } - if ( (type != SID_NAME_DOM_GRP) && (type != SID_NAME_ALIAS) ) { - DEBUG(5,("getgrnam_recv: not a group!\n")); + switch (type) { + case SID_NAME_DOM_GRP: + case SID_NAME_ALIAS: + case SID_NAME_WKN_GRP: + /* + * Also give user types a chance: + * These might be user sids mapped to the ID_TYPE_BOTH, + * and in that case we should construct a group struct. + */ + case SID_NAME_USER: + case SID_NAME_COMPUTER: + break; + default: tevent_req_nterror(req, NT_STATUS_NO_SUCH_GROUP); return; }