1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

r13791: Having S-1-1-0 show up in winbind lookupsid does not really make sense.

Volker
(This used to be commit ae9614ce01)
This commit is contained in:
Volker Lendecke 2006-03-02 18:33:43 +00:00 committed by Gerald (Jerry) Carter
parent 1b456f2894
commit 30675b36f5
2 changed files with 18 additions and 3 deletions

View File

@ -1191,9 +1191,13 @@ BOOL sid_to_gid(const DOM_SID *psid, gid_t *pgid)
goto done; goto done;
} }
if (sid_check_is_in_builtin(psid) && pdb_getgrsid(&map, *psid)) { if ((sid_check_is_in_builtin(psid) ||
*pgid = map.gid; sid_check_is_in_wellknown_domain(psid))) {
goto done; if (pdb_getgrsid(&map, *psid)) {
*pgid = map.gid;
goto done;
}
return False;
} }
if (sid_peek_check_rid(get_global_sam_sid(), psid, &rid)) { if (sid_peek_check_rid(get_global_sam_sid(), psid, &rid)) {

View File

@ -85,6 +85,17 @@ BOOL sid_check_is_wellknown_domain(const DOM_SID *sid, const char **name)
return False; return False;
} }
BOOL sid_check_is_in_wellknown_domain(const DOM_SID *sid)
{
DOM_SID dom_sid;
uint32 rid;
sid_copy(&dom_sid, sid);
sid_split_rid(&dom_sid, &rid);
return sid_check_is_wellknown_domain(&dom_sid, NULL);
}
/************************************************************************** /**************************************************************************
Looks up a known username from one of the known domains. Looks up a known username from one of the known domains.
***************************************************************************/ ***************************************************************************/