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]

[Patch] Deimpersonate while accessing HKLM


This patch should fix the chdir problem reported by Jason Tishler.
It deimpersonates while reading the mounts and cygdrive in HKLM.

For ease of initialization, the unused cygheap->user tokens are
now set to NO_IMPERSONATION (instead of INVALID_HANDLE_VALUE), 
which is #defined as NULL.
If the argument of cygwin_set_impersonation_token() is
INVALID_HANDLE_VALUE, it is changed to NO_IMPERSONATION.

Pierre

2004-10-28  Pierre Humblet <pierre.humblet@ieee.org>

	* path.cc (mount_info::from_registry): Deimpersonate while
	accessing HKLM.
	(mount_info::read_cygdrive_info_from_registry): Ditto.
	* cygheap.h: Define NO_IMPERSONATION.
	(cygheap_user::issetuid): Replace INVALID_HANDLE_VALUE by 
	NO_IMPERSONATION.
	(cygheap_user::has_impersonation_tokens): Ditto.
	(cygheap_user::close_impersonation_tokens): Ditto.
	* uinfo.cc (uinfo_init): Ditto.
	* syscalls.cc (seteuid32): Ditto.
	* security.cc (set_impersonation_token): Ditto.

   

Attachment: imperson.diff
Description: Text document


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