This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: setgroups


On Sun, Jul 28, 2002 at 09:12:23PM -0400, Pierre A. Humblet wrote:
> 2002-07-28 Pierre Humblet <Pierre.Humblet@ieee.org>
> 
> 	* cygheap.h (class cygheap_user): Add member groups.
> 	* security.h (class cygsidlist): Add members type and maxcount, 
> 	methods position, addfromgr, alloc_sids and free_sids and
> 	operator+= (const PSID psid). Modify contains () to call 
> 	position () and optimize add () to use maxcount.
> 	(class user_groups): Create.
> 	Update declarations of verify_token and create_token.
> 	* security.cc (cygsidlist::alloc_sids): New.
> 	(cygsidlist::free_sids): New. 
> 	(get_token_group_sidlist): Create from get_group_sidlist.
> 	(get_initgroups_sidlist): Create from get_group_sidlist.
> 	(get_group_sidlist): Suppress.
> 	(get_setgroups_sidlist): Create.
> 	(verify_token): Modify arguments. Add setgroups case.
> 	(create_token): Modify arguments. Call get_initgroups_sidlist and
> 	get_setgroups_sidlist as needed. Set SE_GROUP_LOGON_ID from auth_pos
> 	outside of the loop. Rename the various group sid lists consistently.
> 	* syscalls.cc (seteuid32): Modify to use cygheap->user.groups.
> 	(setegid32): Call cygheap->user.groups.update_pgrp.
> 	* grp.cc (setgroups): Create.
> 	(setgroups32): Create.
> 	* uinfo.cc (internal_getlogin): Initialize and update user.groups.pgsid.
> 	* cygwin.din: Add setgroups and setgroups32.

Thanks a lot.  I've applied it with some formatting changes.  Please,
don't do this

	if (expr) statement;

I found some of them in security.cc.  I took the chance to do some more
formatting changes in security.cc. 

This time I even remembered to bump the API minor version in
include/cygwin/version.h :-)

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]