summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2012-12-07 00:55:18 +0100
committerStefan Metzmacher <metze@samba.org>2013-01-29 21:56:58 +0100
commit40e3df7c37a15b28f170699ff9b8102416a9107f (patch)
tree4b7d33d7d25ce9eb6bfb961aaad3f6b51455b166
parentd2360fe56c860fa20051f6373eb2fcc3e4def6b6 (diff)
downloadsamba-40e3df7c37a15b28f170699ff9b8102416a9107f.tar.gz
samba-40e3df7c37a15b28f170699ff9b8102416a9107f.tar.bz2
samba-40e3df7c37a15b28f170699ff9b8102416a9107f.zip
s3:winbindd:getgrnam: also produce a group struct for a user with ID_TYPE_BOTH
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r--source3/winbindd/winbindd_getgrnam.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/source3/winbindd/winbindd_getgrnam.c b/source3/winbindd/winbindd_getgrnam.c
index 9a2f64e4ad..bc970cbf22 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;
}