summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--selftest/knownfail.d/passwd-id-type-both4
-rw-r--r--source3/winbindd/wb_queryuser.c18
2 files changed, 16 insertions, 6 deletions
diff --git a/selftest/knownfail.d/passwd-id-type-both b/selftest/knownfail.d/passwd-id-type-both
deleted file mode 100644
index e969ef8d165..00000000000
--- a/selftest/knownfail.d/passwd-id-type-both
+++ /dev/null
@@ -1,4 +0,0 @@
-idmap\.rid.getpwnam for ID_TYPE_BOTH group succeeds\(ad_member_idmap_rid\)
-idmap\.rid.getpwnam for ID_TYPE_BOTH group output\(ad_member_idmap_rid\)
-idmap\.rid.getpwuid for ID_TYPE_BOTH group succeeds\(ad_member_idmap_rid\)
-idmap\.rid.getpwuid for ID_TYPE_BOTH group output\(ad_member_idmap_rid\)
diff --git a/source3/winbindd/wb_queryuser.c b/source3/winbindd/wb_queryuser.c
index 17170c3352a..2eb61406fc5 100644
--- a/source3/winbindd/wb_queryuser.c
+++ b/source3/winbindd/wb_queryuser.c
@@ -166,8 +166,22 @@ static void wb_queryuser_got_domain(struct tevent_req *subreq)
return;
}
- if (type != SID_NAME_USER) {
- /* allow SID_NAME_COMPUTER? */
+ switch (type) {
+ case SID_NAME_USER:
+ case SID_NAME_COMPUTER:
+ /*
+ * user case: we only need the account name from lookup_sids
+ */
+ break;
+ case SID_NAME_DOM_GRP:
+ case SID_NAME_ALIAS:
+ case SID_NAME_WKN_GRP:
+ /*
+ * also treat group-type SIDs (they might map to ID_TYPE_BOTH)
+ */
+ sid_copy(&info->group_sid, &info->user_sid);
+ break;
+ default:
tevent_req_nterror(req, NT_STATUS_NO_SUCH_USER);
return;
}