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>2014-02-18 23:39:48 +0400
committerCorinna Vinschen <corinna@vinschen.de>2014-02-18 23:39:48 +0400
commit036f56cf3215b2afd189d1599f797dc4093275e2 (patch)
tree6ed5aa18f0dd70619fb2a41bd36cc4a6de76f203 /winsup/cygwin/grp.cc
parent68135b2be29d8997c327bd87d0e6b1d52d23ac91 (diff)
* 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.cc22
1 files changed, 22 insertions, 0 deletions
diff --git a/winsup/cygwin/grp.cc b/winsup/cygwin/grp.cc
index 6f9b4b9bb..18e091642 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)
{