diff options
author | Volker Lendecke <vlendec@samba.org> | 2004-03-01 13:02:06 +0000 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2004-03-01 13:02:06 +0000 |
commit | 480fd4f9b558b668c77af2825963e5f9c616c165 (patch) | |
tree | 916389534ec453490c3956a733a7ffd42d261092 /source3/auth | |
parent | 0af6ee14c1ab480e5a3d2e82f803253581a2896f (diff) | |
download | samba-480fd4f9b558b668c77af2825963e5f9c616c165.tar.gz samba-480fd4f9b558b668c77af2825963e5f9c616c165.tar.bz2 samba-480fd4f9b558b668c77af2825963e5f9c616c165.zip |
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)
Diffstat (limited to 'source3/auth')
-rw-r--r-- | source3/auth/auth_util.c | 41 |
1 files changed, 0 insertions, 41 deletions
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<num_aliases; j++) { - gid_t gid; - - if (!NT_STATUS_IS_OK(sid_to_gid(&aliases[j], &gid))) - continue; - - add_gid_to_array_unique(gid, groups, ngroups); - } - SAFE_FREE(aliases); -} - static void add_foreign_gids(uid_t uid, gid_t gid, gid_t **groups, int *ngroups) { |