* 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

@ -466,6 +466,7 @@ fork_parent (HANDLE& hParent, dll *&first_dll,
#endif
char sa_buf[1024];
PSECURITY_ATTRIBUTES sec_attribs = sec_user_nih (sa_buf);
syscall_printf ("CreateProcess (%s, %s, 0, 0, 1, %x, 0, 0, %p, %p)",
myself->progname, myself->progname, c_flags, &si, &pi);
__malloc_lock (_reent_clib ());
@ -473,8 +474,8 @@ fork_parent (HANDLE& hParent, dll *&first_dll,
newheap = cygheap_setup_for_child (&ch,cygheap->fdtab.need_fixup_before ());
rc = CreateProcess (myself->progname, /* image to run */
myself->progname, /* what we send in arg0 */
sec_user_nih (sa_buf),
sec_user_nih (sa_buf),
sec_attribs,
sec_attribs,
TRUE, /* inherit handles from parent */
c_flags,
NULL, /* environment filled in later */