* grp.cc (pwdgrp::parse_group): Set grp.len. Drop generating any

gr_mem entries.
	(getgrgid_r): Don't try to copy gr_mem entries.  Always set gr_mem
	to an empty list.
	(getgrnam_r): Ditto.
	(app_gr): New static struct to store group data propagated to the
	calling application via getgrgid/getgrnam.
	(getgr_cp): Fill app_gr and return pointer to app_gr.g.
	(getgrgid32): Call getgr_cp.
	(getgrnam32): Ditto.
	* passwd.cc (pwdgrp::parse_passwd): Set res.len.
	(app_pw): New static struct to store passwd data propagated to the
	calling application via getpwuid/getpwnam.
	(getpw_cp): Fill app_pw and return pointer to app_pw.p.
	(getpwuid32): Cal getpw_cp.
	(getpwnam): Ditto.
	* pwdgrp.h (struct pg_pwd): Add len member.
	(struct pg_grp): Ditto.
This commit is contained in:
Corinna Vinschen
2014-05-07 11:00:00 +00:00
parent fc3a3524b2
commit 20de26ebf9
4 changed files with 110 additions and 36 deletions

View File

@@ -59,12 +59,14 @@ struct pg_pwd
{
struct passwd p;
cygsid sid;
size_t len;
};
struct pg_grp
{
struct group g;
cygsid sid;
size_t len;
};
class pwdgrp