* 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

@ -1,3 +1,8 @@
2007-01-24 Corinna Vinschen <corinna@vinschen.de>
* security.h (pop_thread_privilege): Revert to previous state, not
to token used for impersonation.
2007-01-24 Corinna Vinschen <corinna@vinschen.de>
* cygheap.h (cygheap_user::deimpersonate): Always RevertToSelf.

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