OSDN Git Service

* dcrt0.cc (dll_crt0_0): Call set_cygwin_privileges here, after
authorcorinna <corinna>
Thu, 19 Jul 2007 07:24:16 +0000 (07:24 +0000)
committercorinna <corinna>
Thu, 19 Jul 2007 07:24:16 +0000 (07:24 +0000)
initializing hProcToken.
* sec_helper.cc (init_global_security): Don't call set_cygwin_privileges        here.

winsup/cygwin/ChangeLog
winsup/cygwin/dcrt0.cc
winsup/cygwin/sec_helper.cc

index 73e0f39..c47df01 100644 (file)
@@ -1,3 +1,9 @@
+2007-07-19  Corinna Vinschen  <corinna@vinschen.de>
+
+       * dcrt0.cc (dll_crt0_0): Call set_cygwin_privileges here, after
+       initializing hProcToken.
+       * sec_helper.cc (init_global_security): Don't call set_cygwin_privileges        here.
+
 2007-07-18  Corinna Vinschen  <corinna@vinschen.de>
 
        * cygheap.h (shared_prefix): De-const.
index 03cb3ff..9e02a6f 100644 (file)
@@ -734,7 +734,9 @@ dll_crt0_0 ()
 
   DuplicateHandle (hMainProc, GetCurrentThread (), hMainProc,
                   &hMainThread, 0, false, DUPLICATE_SAME_ACCESS);
+
   OpenProcessToken (hMainProc, MAXIMUM_ALLOWED, &hProcToken);
+  set_cygwin_privileges (hProcToken);
 
   device::init ();
   do_global_ctors (&__CTOR_LIST__, 1);
index 22809a3..416488a 100644 (file)
@@ -530,8 +530,6 @@ init_global_security ()
   sec_none.lpSecurityDescriptor = sec_none_nih.lpSecurityDescriptor = NULL;
   sec_all.lpSecurityDescriptor = sec_all_nih.lpSecurityDescriptor =
     get_null_sd ();
-
-  set_cygwin_privileges (hProcToken);
 }
 
 bool