diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2005-04-16 15:21:47 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2005-04-16 15:21:47 +0000 |
commit | 68a3f0d34af960ecb1da72ce70819189a3b6dd29 (patch) | |
tree | b06e50bb18f618e2fccf7f3e8073662f1929a28d /winsup/cygwin/security.h | |
parent | 00c05edcf1457ce2b6a03892c095ced9e4d15465 (diff) | |
download | cygnal-68a3f0d34af960ecb1da72ce70819189a3b6dd29.tar.gz cygnal-68a3f0d34af960ecb1da72ce70819189a3b6dd29.tar.bz2 cygnal-68a3f0d34af960ecb1da72ce70819189a3b6dd29.zip |
* security.h (cygsidlist::addfromgr): Allow duplicate entries.
(get_server_groups): Declare new function.
* security.cc (is_group_member): Simplify.
(get_server_groups): New function.
(get_initgroups_sidlist): Call get_server_groups.
(verify_token): Allow token when supplementary sids are not in
/etc/group but are in the token.
Streamline the code.
* grp.cc (initgroups32): New implementation.
(getgroups32): Handle case where the supplementary groups are set.
Diffstat (limited to 'winsup/cygwin/security.h')
-rw-r--r-- | winsup/cygwin/security.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/security.h b/winsup/cygwin/security.h index 1c95d30b3..d304525a4 100644 --- a/winsup/cygwin/security.h +++ b/winsup/cygwin/security.h @@ -148,8 +148,7 @@ public: BOOL add (const char *sidstr) { cygsid nsi (sidstr); return add (nsi); } BOOL addfromgr (struct __group32 *gr) /* Only with alloc */ - { return sids[count].getfromgr (gr) - && (contains (sids[count]) || ++count); } + { return sids[count].getfromgr (gr) && ++count; } BOOL operator+= (cygsid &si) { return add (si); } BOOL operator+= (const char *sidstr) { return add (sidstr); } @@ -326,6 +325,8 @@ HANDLE subauth (struct passwd *pw); HANDLE create_token (cygsid &usersid, user_groups &groups, struct passwd * pw); /* Verify an existing token */ bool verify_token (HANDLE token, cygsid &usersid, user_groups &groups, bool *pintern = NULL); +/* Get groups of a user */ +bool get_server_groups (cygsidlist &grp_list, PSID usersid, struct passwd *pw); /* Extract U-domain\user field from passwd entry. */ void extract_nt_dom_user (const struct passwd *pw, char *domain, char *user); |