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: Problems on accessing Windows network resources


Hi Pierre,

On Fri, Jul 11, 2003 at 08:02:53PM -0400, Pierre A. Humblet wrote:
> 2003-07-12  Pierre Humblet  <pierre.humblet@ieee.org>
> 
> 	* cygheap.h (enum impersonation): Delete.
> 	(cygheap_user::impersonation_state): Delete.
> 	(cygheap_user::current_token): New.
> 	(cygheap_user::issetuid): Modify to use current_token.
> 	(cygheap_user::token): Ditto.
> 	(cygheap_user::deimpersonate): Ditto.
> 	(cygheap_user::reimpersonate): Ditto.
> 	(cygheap_user::has_impersonation_tokens): Ditto.
> 	(cygheap_user::close_impersonation_tokens): Ditto.
> 	* security.cc (cygwin_set_impersonation_token): Always set the token.
> 	(verify_token): Change type of gsid to cygpsid.
> 	(get_file_attribute): Use the effective ids.
> 	* syscalls.cc (seteuid32): Modify to use cygheap_user::current_token.
> 	* uinfo.cc (uinfo_init) Do not set cygheap->user.impersonation_state.

thanks for the patch but it has a problem.  You're comparing tokens against
NULL while the correct "NULL" value for tokens is INVALID_HANDLE_VALUE. 
Unfortunately I saw for the first time that you already did the same for
external_token and internal_token.  So currently the code sometimes
compares with NULL and sometimes compares with INVALID_HANDLE_VALUE.  Could
you please change that to always use INVALID_HANDLE_VALUE?  This implies
to initialize current_token, external_token and internal_token all three
to INVALID_HANDLE_VALUE.

Thanks,
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]