* security.h (pop_thread_privilege): Revert to previous state, not

to token used for impersonation.
This commit is contained in:
Corinna Vinschen
2007-01-24 12:14:54 +00:00
parent a0e1630add
commit fd1bf882f5
2 changed files with 7 additions and 2 deletions

View File

@ -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); \
} \
}