diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2014-02-18 19:39:48 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2014-02-18 19:39:48 +0000 |
commit | 036f56cf3215b2afd189d1599f797dc4093275e2 (patch) | |
tree | 6ed5aa18f0dd70619fb2a41bd36cc4a6de76f203 /winsup/cygwin/grp.cc | |
parent | 68135b2be29d8997c327bd87d0e6b1d52d23ac91 (diff) | |
download | newlib-036f56cf3215b2afd189d1599f797dc4093275e2.zip newlib-036f56cf3215b2afd189d1599f797dc4093275e2.tar.gz newlib-036f56cf3215b2afd189d1599f797dc4093275e2.tar.bz2 |
* external.cc (cygwin_internal): Handle new CW_SETENT, CW_GETENT and
CW_ENDENT info types.
* grp.cc (setgrent_filtered): New function, called from cygwin_internal.
(getgrent_filtered): Ditto.
(endgrent_filtered): Ditto.
* passwd.cc (pg_ent::setent): Set state explicitely to from_cache.
(pg_ent::getent): Handle the fact that a DC has no SAM and enumerating
local accounts is equivalent to enumerating domain accounts.
(setpwent_filtered): New function, called from cygwin_internal.
(getpwent_filtered): Ditto.
(endpwent_filtered): Ditto.
* pwdgrp.h (setpwent_filtered): Declare.
(getgrent_filtered): Ditto.
(endgrent_filtered): Ditto.
(setpwent_filtered): Ditto.
(getpwent_filtered): Ditto.
(endpwent_filtered): Ditto.
* include/sys/cygwin.h (cygwin_getinfo_types): Add CW_SETENT, CW_GETENT,
and CW_ENDENT.
Diffstat (limited to 'winsup/cygwin/grp.cc')
-rw-r--r-- | winsup/cygwin/grp.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/winsup/cygwin/grp.cc b/winsup/cygwin/grp.cc index 6f9b4b9..18e0916 100644 --- a/winsup/cygwin/grp.cc +++ b/winsup/cygwin/grp.cc @@ -429,6 +429,28 @@ endgrent (void) grent.endgrent (); } +/* *_filtered functions are called from mkgroup */ +void * +setgrent_filtered (int enums, PCWSTR enum_tdoms) +{ + gr_ent *gr = new gr_ent; + if (gr) + gr->setgrent (enums, enum_tdoms); + return (void *) gr; +} + +void * +getgrent_filtered (void *gr) +{ + return (void *) ((gr_ent *) gr)->getgrent (); +} + +void +endgrent_filtered (void *gr) +{ + ((gr_ent *) gr)->endgrent (); +} + int internal_getgroups (int gidsetsize, gid_t *grouplist, cygpsid *srchsid) { |