From 480fd4f9b558b668c77af2825963e5f9c616c165 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 1 Mar 2004 13:02:06 +0000 Subject: Add aliases to winbindd_getgroups(). su - WINDOWS\\vl now includes the locally defined aliases I'm member of. Next will be getent group. Volker (This used to be commit 52dae45684317ac8ac529017607bb5787dda7c50) --- source3/auth/auth_util.c | 41 ----------------------------------------- 1 file changed, 41 deletions(-) (limited to 'source3/auth') diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index 912432b98f..4a23593936 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -635,47 +635,6 @@ NT_USER_TOKEN *create_nt_token(uid_t uid, gid_t gid, int ngroups, gid_t *groups, return token; } -static void add_gid_to_array_unique(gid_t gid, gid_t **groups, int *ngroups) -{ - int i; - - if ((*ngroups) >= groups_max()) - return; - - for (i=0; i<*ngroups; i++) { - if ((*groups)[i] == gid) - return; - } - - *groups = Realloc(*groups, ((*ngroups)+1) * sizeof(gid_t)); - - if (*groups == NULL) - return; - - (*groups)[*ngroups] = gid; - *ngroups += 1; -} - -static void add_foreign_gids_from_sid(const DOM_SID *sid, gid_t **groups, - int *ngroups) -{ - DOM_SID *aliases; - int j, num_aliases; - - if (!pdb_enum_alias_memberships(sid, &aliases, &num_aliases)) - return; - - for (j=0; j