diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2002-08-02 11:00:18 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2002-08-02 11:00:18 +0000 |
commit | 23d93d8db713189abb9616332ef77837a0e6c808 (patch) | |
tree | e9186d77fdcdf4935f2ea0bd512a8848187e28ac /winsup/cygwin/grp.cc | |
parent | 04875a95c879a55f68ef2956b172a96d3fea7c95 (diff) | |
download | newlib-23d93d8db713189abb9616332ef77837a0e6c808.zip newlib-23d93d8db713189abb9616332ef77837a0e6c808.tar.gz newlib-23d93d8db713189abb9616332ef77837a0e6c808.tar.bz2 |
* security.cc (verify_token): Do not reject a token just because
the supplementary group list is missing Everyone or a groupsid
equal to usersid, or because the primary group is not in the token,
as long as it is equal to the usersid.
* syscalls.cc (seteuid32): Use common code for all successful returns.
* grp.cc (getgroups32): Never includes Everyone in the output.
Diffstat (limited to 'winsup/cygwin/grp.cc')
-rw-r--r-- | winsup/cygwin/grp.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/grp.cc b/winsup/cygwin/grp.cc index c26a6b1..5bfb50e 100644 --- a/winsup/cygwin/grp.cc +++ b/winsup/cygwin/grp.cc @@ -365,7 +365,8 @@ getgroups32 (int gidsetsize, __gid32_t *grouplist, __gid32_t gid, for (int gidx = 0; (gr = internal_getgrent (gidx)); ++gidx) if (sid.getfromgr (gr)) for (DWORD pg = 0; pg < groups->GroupCount; ++pg) - if (sid == groups->Groups[pg].Sid) + if (sid == groups->Groups[pg].Sid && + sid != well_known_world_sid) { if (cnt < gidsetsize) grouplist[cnt] = gr->gr_gid; @@ -516,5 +517,4 @@ setgroups (int ngroups, const __gid16_t *grouplist) grouplist32[i] = grouplist[i]; } return setgroups32 (ngroups, grouplist32); - } |