OSDN Git Service

* security.h (pop_thread_privilege): Revert to previous state, not
authorcorinna <corinna>
Wed, 24 Jan 2007 12:14:54 +0000 (12:14 +0000)
committercorinna <corinna>
Wed, 24 Jan 2007 12:14:54 +0000 (12:14 +0000)
to token used for impersonation.

winsup/cygwin/ChangeLog
winsup/cygwin/security.h

index 0c158f2..fe75a1b 100644 (file)
@@ -1,5 +1,10 @@
 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.
 
 2007-01-23  Corinna Vinschen  <corinna@vinschen.de>
index f1d624f..6d77716 100644 (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); \
       } \
   }