From 40e3df7c37a15b28f170699ff9b8102416a9107f Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 7 Dec 2012 00:55:18 +0100 Subject: [PATCH] s3:winbindd:getgrnam: also produce a group struct for a user with ID_TYPE_BOTH Signed-off-by: Michael Adam Reviewed-by: Stefan Metzmacher --- source3/winbindd/winbindd_getgrnam.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) 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; } -- 2.11.4.GIT