* 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.
This commit is contained in:
Corinna Vinschen
2002-09-11 10:37:11 +00:00
parent 22f8000733
commit 5a8746b732
4 changed files with 21 additions and 3 deletions

View File

@ -86,7 +86,7 @@ public:
}
};
typedef enum { cygsidlist_unknown, cygsidlist_alloc, cygsidlist_auto } cygsidlist_type;
typedef enum { cygsidlist_empty, cygsidlist_alloc, cygsidlist_auto } cygsidlist_type;
class cygsidlist {
int maxcount;
public:
@ -167,6 +167,11 @@ public:
sgsids = newsids;
ischanged = TRUE;
}
void clear_supp ()
{
sgsids.free_sids ();
ischanged = TRUE;
}
void update_pgrp (const PSID sid)
{
pgsid = sid;