diff options
Diffstat (limited to 'winsup/cygwin/dtable.cc')
-rw-r--r-- | winsup/cygwin/dtable.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc index 241528a3d..b94e9cf38 100644 --- a/winsup/cygwin/dtable.cc +++ b/winsup/cygwin/dtable.cc @@ -618,7 +618,7 @@ dtable::vfork_child_dup () int res = 1; /* Remove impersonation */ - if (cygheap->user.impersonated && cygheap->user.token != INVALID_HANDLE_VALUE) + if (cygheap->user.issetuid ()) RevertToSelf (); for (size_t i = 0; i < size; i++) @@ -638,7 +638,7 @@ dtable::vfork_child_dup () out: /* Restore impersonation */ - if (cygheap->user.impersonated && cygheap->user.token != INVALID_HANDLE_VALUE) + if (cygheap->user.issetuid ()) ImpersonateLoggedOnUser (cygheap->user.token); ReleaseResourceLock (LOCK_FD_LIST, WRITE_LOCK | READ_LOCK, "dup"); |