mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-03-02 21:15:27 +08:00
* spawn.cc (spawn_guts): Define sec_attribs and call sec_user_nih() only once.
This commit is contained in:
parent
380aaf2d2c
commit
d5377829a8
@ -1,3 +1,8 @@
|
|||||||
|
2002-06-09 Pierre Humblet <pierre.humblet@ieee.org>
|
||||||
|
|
||||||
|
* spawn.cc (spawn_guts): Define sec_attribs and call sec_user_nih()
|
||||||
|
only once.
|
||||||
|
|
||||||
2002-06-10 Christopher Faylor <cgf@redhat.com>
|
2002-06-10 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
* Makefile.in: Ensure that -MD gets added to CFLAGS regardless of
|
* Makefile.in: Ensure that -MD gets added to CFLAGS regardless of
|
||||||
|
@ -623,7 +623,7 @@ spawn_guts (const char * prog_arg, const char *const *argv,
|
|||||||
cygbench ("spawn-guts");
|
cygbench ("spawn-guts");
|
||||||
if (!cygheap->user.impersonated || cygheap->user.token == INVALID_HANDLE_VALUE)
|
if (!cygheap->user.impersonated || cygheap->user.token == INVALID_HANDLE_VALUE)
|
||||||
{
|
{
|
||||||
|
PSECURITY_ATTRIBUTES sec_attribs = sec_user_nih (sa_buf);
|
||||||
ciresrv.moreinfo->uid = getuid32 ();
|
ciresrv.moreinfo->uid = getuid32 ();
|
||||||
/* FIXME: This leaks a handle in the CreateProcessAsUser case since the
|
/* FIXME: This leaks a handle in the CreateProcessAsUser case since the
|
||||||
child process doesn't know about cygwin_mount_h. */
|
child process doesn't know about cygwin_mount_h. */
|
||||||
@ -631,10 +631,8 @@ spawn_guts (const char * prog_arg, const char *const *argv,
|
|||||||
newheap = cygheap_setup_for_child (&ciresrv, cygheap->fdtab.need_fixup_before ());
|
newheap = cygheap_setup_for_child (&ciresrv, cygheap->fdtab.need_fixup_before ());
|
||||||
rc = CreateProcess (runpath, /* image name - with full path */
|
rc = CreateProcess (runpath, /* image name - with full path */
|
||||||
one_line.buf, /* what was passed to exec */
|
one_line.buf, /* what was passed to exec */
|
||||||
/* process security attrs */
|
sec_attribs, /* process security attrs */
|
||||||
sec_user_nih (sa_buf),
|
sec_attribs, /* thread security attrs */
|
||||||
/* thread security attrs */
|
|
||||||
sec_user_nih (sa_buf),
|
|
||||||
TRUE, /* inherit handles from parent */
|
TRUE, /* inherit handles from parent */
|
||||||
flags,
|
flags,
|
||||||
envblock, /* environment */
|
envblock, /* environment */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user