diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2002-09-11 10:37:11 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2002-09-11 10:37:11 +0000 |
commit | 5a8746b73201f906c0a2d03041130c28f89eb26d (patch) | |
tree | cccaba3bb75d28da890a4174c9d4d854c54aa7ff /winsup/cygwin/grp.cc | |
parent | 22f8000733076a2acf41e58f8294341c256628b0 (diff) | |
download | cygnal-5a8746b73201f906c0a2d03041130c28f89eb26d.tar.gz cygnal-5a8746b73201f906c0a2d03041130c28f89eb26d.tar.bz2 cygnal-5a8746b73201f906c0a2d03041130c28f89eb26d.zip |
* grp.cc (initgroups): Call groups::clear_supp to free the
supplementary group sids that may have been set by setgroups.
* security.cc (cygsidlist::free_sids): Also zero the class members.
* security.h (groups::clear_supp): New.
Rename cygsidlist_unknown to cygsidlist_empty.
Diffstat (limited to 'winsup/cygwin/grp.cc')
-rw-r--r-- | winsup/cygwin/grp.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/winsup/cygwin/grp.cc b/winsup/cygwin/grp.cc index 5bfb50e14..31f577a94 100644 --- a/winsup/cygwin/grp.cc +++ b/winsup/cygwin/grp.cc @@ -449,14 +449,16 @@ extern "C" int initgroups32 (const char *, __gid32_t) { + if (wincap.has_security ()) + cygheap->user.groups.clear_supp (); return 0; } extern "C" int -initgroups (const char *, __gid16_t) +initgroups (const char * name, __gid16_t gid) { - return 0; + return initgroups32 (name, gid16togid32(gid)); } /* setgroups32: standards? */ |