summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2004-06-03 09:25:01 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:51:52 -0500
commit4e1b26db3490c6063bf0ea05b8ae7e34a96ca8a9 (patch)
treedd06e923eebe3bb0c2a51dbecdf8563517efe2d5 /source3/nsswitch
parentb24835c155d90fe9871cfa5d77f9883c8b0de540 (diff)
downloadsamba-4e1b26db3490c6063bf0ea05b8ae7e34a96ca8a9.tar.gz
samba-4e1b26db3490c6063bf0ea05b8ae7e34a96ca8a9.tar.bz2
samba-4e1b26db3490c6063bf0ea05b8ae7e34a96ca8a9.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 (This used to be commit 5070c1b68f2add16916ba3135984f6e70bbe42cf)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/winbindd_group.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source3/nsswitch/winbindd_group.c b/source3/nsswitch/winbindd_group.c
index 0e6c98e5d3..346a2711b6 100644
--- a/source3/nsswitch/winbindd_group.c
+++ b/source3/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);
}