* spawn.cc (spawn_guts): Move call to set_process_privilege()

to load_registry_hive().
	* registry.cc (load_registry_hive): ditto.
	* fork.cc (fork_parent): Call sec_user_nih() only once.
This commit is contained in:
Corinna Vinschen
2002-05-06 10:05:46 +00:00
parent 3d9bc8a617
commit a991777994
4 changed files with 13 additions and 11 deletions

View File

@ -235,12 +235,13 @@ load_registry_hive (PSID psid)
/* Check if user hive is already loaded. */
cygsid csid (psid);
csid.string (sid);
if (!RegOpenKeyExA (HKEY_USERS, csid.string (sid), 0, KEY_READ, &hkey))
if (!RegOpenKeyExA (HKEY_USERS, sid, 0, KEY_READ, &hkey))
{
debug_printf ("User registry hive for %s already exists", sid);
RegCloseKey (hkey);
return;
}
set_process_privilege (SE_RESTORE_NAME);
if (get_registry_hive_path (psid, path))
{
strcat (path, "\\NTUSER.DAT");