* grp.cc (internal_getgroups): Take additional timeout_ns parameter.

Restrict fetching group account entries from user token groups by
	timeout_ns 100ns-intervals.  Add preceding comment to explain why.
	* pwdgrp.h (internal_getgroups): Align prototype.
	* times.cc (GetTickCount_ns): New function.
	* uinfo.cc (internal_getlogin): Call internal_getgroups wih 300ms
	timeout.
	* winsup.h (GetTickCount_ns): Declare.
This commit is contained in:
Corinna Vinschen
2015-02-20 15:13:46 +00:00
parent 89a3749928
commit d6f62a1178
6 changed files with 46 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
/* pwdgrp.h
Copyright 2001, 2002, 2003, 2014 Red Hat inc.
Copyright 2001, 2002, 2003, 2014, 2015 Red Hat inc.
Stuff common to pwd and grp handling.
@@ -27,7 +27,7 @@ extern struct group *internal_getgrsid_from_db (cygpsid &sid);
extern struct group *internal_getgrgid (gid_t, cyg_ldap * = NULL);
extern struct group *internal_getgrnam (const char *, cyg_ldap * = NULL);
extern int internal_getgroups (int, gid_t *, cyg_ldap *);
extern int internal_getgroups (int, gid_t *, cyg_ldap *, const DWORD = 0);
/* These functions are called from mkpasswd/mkgroup via cygwin_internal. */
void *setpwent_filtered (int enums, PCWSTR enum_tdoms);