diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2007-01-24 12:14:54 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2007-01-24 12:14:54 +0000 |
commit | fd1bf882f586496e6738df441a116b4cd2a9e875 (patch) | |
tree | a2539cc69adc1deeb23b4c10d4346801767c3a2f /winsup/cygwin/security.h | |
parent | a0e1630adda19c4a0eb8644d748376b89b9aff42 (diff) | |
download | cygnal-fd1bf882f586496e6738df441a116b4cd2a9e875.tar.gz cygnal-fd1bf882f586496e6738df441a116b4cd2a9e875.tar.bz2 cygnal-fd1bf882f586496e6738df441a116b4cd2a9e875.zip |
* security.h (pop_thread_privilege): Revert to previous state, not
to token used for impersonation.
Diffstat (limited to 'winsup/cygwin/security.h')
-rw-r--r-- | winsup/cygwin/security.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/security.h b/winsup/cygwin/security.h index f1d624ff7..6d77716e5 100644 --- a/winsup/cygwin/security.h +++ b/winsup/cygwin/security.h @@ -408,10 +408,10 @@ void set_cygwin_privileges (HANDLE token); #define pop_thread_privilege() \ if (_dup_token) \ { \ - if (_token == hProcToken) \ + if (!cygheap->user.issetuid ()) \ RevertToSelf (); \ else \ - ImpersonateLoggedOnUser (_token); \ + cygheap->user.reimpersonate (); \ CloseHandle (_dup_token); \ } \ } |