Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2002-08-02 15:00:18 +0400
committerCorinna Vinschen <corinna@vinschen.de>2002-08-02 15:00:18 +0400
commit23d93d8db713189abb9616332ef77837a0e6c808 (patch)
treee9186d77fdcdf4935f2ea0bd512a8848187e28ac /winsup/cygwin/grp.cc
parent04875a95c879a55f68ef2956b172a96d3fea7c95 (diff)
* 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.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/grp.cc b/winsup/cygwin/grp.cc
index c26a6b1c7..5bfb50e14 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);
-
}