* Makefile.in: Ensure that -MD gets added to CFLAGS regardless of CFLAGS
command-line setting. * cygwin.din: Export sexec* functions as function which returns ENOSYS (i.e., sexec* is deprecated). * dtable.cc (dtable::vfork_child_dup): Ensure that impersonation is restored even on failure. * exec.cc: Throughout, remove references to sexec* and _spawnve. * pinfo.h: Remove _spawnve declaration. * spawn.cc: Rename _spawnve to spawnve and use throughout. (spawn_guts): Eliminate hToken argument and processing of same. Just perform special actions if impersonating. (spawnve): Rename from _spawnve.
This commit is contained in:
@@ -633,14 +633,14 @@ dtable::vfork_child_dup ()
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Restore impersonation */
|
||||
if (cygheap->user.impersonated && cygheap->user.token != INVALID_HANDLE_VALUE)
|
||||
ImpersonateLoggedOnUser (cygheap->user.token);
|
||||
|
||||
fds_on_hold = fds;
|
||||
fds = newtable;
|
||||
|
||||
out:
|
||||
/* Restore impersonation */
|
||||
if (cygheap->user.impersonated && cygheap->user.token != INVALID_HANDLE_VALUE)
|
||||
ImpersonateLoggedOnUser (cygheap->user.token);
|
||||
|
||||
ReleaseResourceLock (LOCK_FD_LIST, WRITE_LOCK | READ_LOCK, "dup");
|
||||
return 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user