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: Part 2 of Fixing a security hole in mount table.


On Tue, Sep 09, 2003 at 11:54:26PM -0400, Pierre A. Humblet wrote:
> 2003-09-10  Pierre Humblet <pierre.humblet@ieee.org>
> 
> 	* shared_info.h (shared_info::initialize): Remove argument.
> 	* cygheap.h (cygheap_user::init): New declaration.
> 	* uinfo.cc (cygheap_user::init): New.
> 	(internal_getlogin): Move functionality to cygheap_user::init.
> 	Open the process token to update the group sid.
> 	* shared.cc (user_shared_initialize): Get the user information
> 	from cygheap->user.
> 	(shared_info::initialize): Remove argument. Call cygheap->user.init
> 	instead of cygheap->user.set_name.
> 	(memory_init): Do not get the user name and do not pass it to
> 	shared_info::initialize.
> 	* registry.cc (get_registry_hive_path): Make csid a cygpsid.
> 	(load_registry_hive): Ditto.

Looks good to me, except for:

> -  char name[UNLEN + 1] = "";
> +  char name[UNLEN > 127 ? UNLEN + 1 : 128] = "";

Huh?  Why that?  UNLEN is defined as 256 in lmcons.h so I don't understand
the reasoning behind that complexity.

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]