Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/fork.cc')
-rw-r--r--winsup/cygwin/fork.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc
index 646dbee58..b3c96f7e5 100644
--- a/winsup/cygwin/fork.cc
+++ b/winsup/cygwin/fork.cc
@@ -436,7 +436,7 @@ fork_parent (void *stack_here, HANDLE& hParent, dll *&first_dll,
uid_t uid;
uid = geteuid();
if (cygheap->user.impersonated && cygheap->user.token != INVALID_HANDLE_VALUE)
- seteuid (cygheap->user.orig_uid);
+ RevertToSelf ();
ch.parent = hParent;
ch.cygheap = cygheap;
@@ -484,7 +484,7 @@ out:
/* Restore impersonation */
if (cygheap->user.impersonated
&& cygheap->user.token != INVALID_HANDLE_VALUE)
- seteuid (uid);
+ ImpersonateLoggedOnUser (cygheap->user.token);
return -1;
}
@@ -508,7 +508,7 @@ out:
/* Restore impersonation */
if (cygheap->user.impersonated && cygheap->user.token != INVALID_HANDLE_VALUE)
- seteuid (uid);
+ ImpersonateLoggedOnUser (cygheap->user.token);
ProtectHandle (pi.hThread);
/* Protect the handle but name it similarly to the way it will