diff options
author | Volker Lendecke <vlendec@samba.org> | 2004-06-03 09:25:01 +0000 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2004-06-03 09:25:01 +0000 |
commit | 9c7ff1161072a3297b09c4057c1c1f8c59cfcc1d (patch) | |
tree | 8c0937701fb3ecb6ad36cc77ca1e0510c54b5a39 /source/nsswitch | |
parent | 0b769108372b6c0f436c2889450bc3537cb0f960 (diff) | |
download | samba-9c7ff1161072a3297b09c4057c1c1f8c59cfcc1d.tar.gz samba-9c7ff1161072a3297b09c4057c1c1f8c59cfcc1d.tar.xz samba-9c7ff1161072a3297b09c4057c1c1f8c59cfcc1d.zip |
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
Diffstat (limited to 'source/nsswitch')
-rw-r--r-- | source/nsswitch/winbindd_group.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/nsswitch/winbindd_group.c b/source/nsswitch/winbindd_group.c index 0e6c98e5d36..346a2711b6c 100644 --- a/source/nsswitch/winbindd_group.c +++ b/source/nsswitch/winbindd_group.c @@ -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); } |