mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
r989: Calling sid_to_gid from within winbind makes no sense, as this calls
winbind_sid_to_gid. For the consistency check, local_sid_to_gid must set the
name_type it found.
Volker
(This used to be commit 5070c1b68f
)
This commit is contained in:
parent
b24835c155
commit
4e1b26db34
@ -963,9 +963,17 @@ static void add_local_gids_from_sid(DOM_SID *sid, gid_t **gids, int *num)
|
||||
return;
|
||||
|
||||
for (j=0; j<num_aliases; j++) {
|
||||
enum SID_NAME_USE type;
|
||||
|
||||
if (!NT_STATUS_IS_OK(sid_to_gid(&aliases[j], &gid)))
|
||||
if (!local_sid_to_gid(&gid, &aliases[j], &type)) {
|
||||
DEBUG(1, ("Got an alias membership with no alias\n"));
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((type != SID_NAME_ALIAS) && (type != SID_NAME_WKN_GRP)) {
|
||||
DEBUG(1, ("Got an alias membership in a non-alias\n"));
|
||||
continue;
|
||||
}
|
||||
|
||||
add_gid_to_array_unique(gid, gids, num);
|
||||
}
|
||||
|
@ -1287,6 +1287,7 @@ BOOL local_sid_to_gid(gid_t *pgid, const DOM_SID *psid, enum SID_NAME_USE *name_
|
||||
}
|
||||
|
||||
*pgid = group.gid;
|
||||
*name_type = group.sid_name_use;
|
||||
|
||||
DEBUG(10,("local_sid_to_gid: SID %s -> gid (%u)\n", sid_string_static(psid),
|
||||
(unsigned int)*pgid));
|
||||
|
Loading…
Reference in New Issue
Block a user