This is the mail archive of the 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] Loading the registry hive on Win9x (part 2)

This is the second part of the patch to also load the registry hive
on Win9x during seteuid, and to apply the method recommended in
MS KB 199190 to avoid using HKCU.

The main change is a new reg_key constructor that does not use
HKCU and that can also use HKLM.

There are collateral changes in, which is now 50 lines
shorter, as well as in and

The two cygdrive bugs shown below are fixed. 

~: mount -p
Prefix              Type         Flags
~: umount -c
umount: remove_cygdrive_prefix: No error    <=== NOT RIGHT
~: ls -ld /cygdrive/c
drwxr-xr-x   14 pierre   all             0 Dec 31  1969 /cygdrive/c/
~: mount -c /xyz
~: mount -p
Prefix              Type         Flags
/xyz                system       binmode
~: ls -ld /xyz/c
ls: /xyz/c: No such file or directory       <==== NOT RIGHT


2004-11-22  Pierre Humblet <>

	* registry.h (reg_key::reg_key): Change arguments.
	* shared_info.h (class mount_info): Remove had_to_create_mount_areas.
	* (reg_key::reg_key): Change constructors to always handle
	HKLM and to avoid relying on HKCU. 
	Do not set mount_table->had_to_create_mount_areas. 
	* (mount_info::conv_to_win32_path): Improve update of 
	(mount_info::read_mounts): Use new reg_key constructor.	
	(mount_info::add_reg_mount): Ditto. 
	(mount_info::del_reg_mount): Ditto.
	(mount_info::read_cygdrive_info_from_registry): Ditto. 
	(mount_info::write_cygdrive_info_to_registry): Ditto.
	Update cygwin_shared->sys_mount_table_counter after registry update.
	(mount_info::get_cygdrive_info): Ditto.
	* (shared_info::heap_chunk_size): Use new reg_key constructor.
	* (regopt): Ditto.
	(environ_init): Optimize calls to regopt.

Attachment: hive3.diff
Description: Text document

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