From 8937c103ed141d998d5801e026dc732a883da98c Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 23 Oct 2008 21:00:45 +0000 Subject: [PATCH] * wincap.cc (all wincaps): Store in .cygwin_dll_common section same as wincap. Add comment to explain why. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/wincap.cc | 26 ++++++++++++++++---------- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 38b4beb6d..136805c91 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2008-10-23 Corinna Vinschen + + * wincap.cc (all wincaps): Store in .cygwin_dll_common section same as + wincap. Add comment to explain why. + 2008-10-22 Corinna Vinschen * autoload.cc (GetSystemWindowsDirectoryW): Define. diff --git a/winsup/cygwin/wincap.cc b/winsup/cygwin/wincap.cc index f2a3ef1fe..4d20ecce3 100644 --- a/winsup/cygwin/wincap.cc +++ b/winsup/cygwin/wincap.cc @@ -13,8 +13,14 @@ details. */ #include "security.h" #include "ntdll.h" +/* CV, 2008-10-23: All wincapc's have to be in the .cygwin_dll_common section, + same as wincap itself. Otherwise the capability changes made in + wincapc::init() are not propagated to any subsequently started process + in the same session. I'm only writing this longish comment because I'm + puzzled that this has never been noticed before... */ + /* Minimal set of capabilities which is equivalent to NT4. */ -static NO_COPY wincaps wincap_unknown = { +wincaps wincap_unknown __attribute__((section (".cygwin_dll_common"), shared)) = { chunksize:0, heapslop:0x0, max_sys_priv:SE_CHANGE_NOTIFY_PRIVILEGE, @@ -46,7 +52,7 @@ static NO_COPY wincaps wincap_unknown = { has_transactions:false, }; -static NO_COPY wincaps wincap_nt4 = { +wincaps wincap_nt4 __attribute__((section (".cygwin_dll_common"), shared)) = { chunksize:0, heapslop:0x0, max_sys_priv:SE_CHANGE_NOTIFY_PRIVILEGE, @@ -78,7 +84,7 @@ static NO_COPY wincaps wincap_nt4 = { has_transactions:false, }; -static NO_COPY wincaps wincap_nt4sp4 = { +wincaps wincap_nt4sp4 __attribute__((section (".cygwin_dll_common"), shared)) = { chunksize:0, heapslop:0x0, max_sys_priv:SE_CHANGE_NOTIFY_PRIVILEGE, @@ -110,7 +116,7 @@ static NO_COPY wincaps wincap_nt4sp4 = { has_transactions:false, }; -static NO_COPY wincaps wincap_2000 = { +wincaps wincap_2000 __attribute__((section (".cygwin_dll_common"), shared)) = { chunksize:0, heapslop:0x0, max_sys_priv:SE_MANAGE_VOLUME_PRIVILEGE, @@ -142,7 +148,7 @@ static NO_COPY wincaps wincap_2000 = { has_transactions:false, }; -static NO_COPY wincaps wincap_2000sp4 = { +wincaps wincap_2000sp4 __attribute__((section (".cygwin_dll_common"), shared)) = { chunksize:0, heapslop:0x0, max_sys_priv:SE_CREATE_GLOBAL_PRIVILEGE, @@ -174,7 +180,7 @@ static NO_COPY wincaps wincap_2000sp4 = { has_transactions:false, }; -static NO_COPY wincaps wincap_xp = { +wincaps wincap_xp __attribute__((section (".cygwin_dll_common"), shared)) = { chunksize:0, heapslop:0x0, max_sys_priv:SE_MANAGE_VOLUME_PRIVILEGE, @@ -206,7 +212,7 @@ static NO_COPY wincaps wincap_xp = { has_transactions:false, }; -static NO_COPY wincaps wincap_xpsp1 = { +wincaps wincap_xpsp1 __attribute__((section (".cygwin_dll_common"), shared)) = { chunksize:0, heapslop:0x0, max_sys_priv:SE_MANAGE_VOLUME_PRIVILEGE, @@ -238,7 +244,7 @@ static NO_COPY wincaps wincap_xpsp1 = { has_transactions:false, }; -static NO_COPY wincaps wincap_xpsp2 = { +wincaps wincap_xpsp2 __attribute__((section (".cygwin_dll_common"), shared)) = { chunksize:0, heapslop:0x0, max_sys_priv:SE_CREATE_GLOBAL_PRIVILEGE, @@ -270,7 +276,7 @@ static NO_COPY wincaps wincap_xpsp2 = { has_transactions:false, }; -static NO_COPY wincaps wincap_2003 = { +wincaps wincap_2003 __attribute__((section (".cygwin_dll_common"), shared)) = { chunksize:0, heapslop:0x4, max_sys_priv:SE_CREATE_GLOBAL_PRIVILEGE, @@ -302,7 +308,7 @@ static NO_COPY wincaps wincap_2003 = { has_transactions:false, }; -static NO_COPY wincaps wincap_vista = { +wincaps wincap_vista __attribute__((section (".cygwin_dll_common"), shared)) = { chunksize:0, heapslop:0x4, max_sys_priv:SE_CREATE_SYMBOLIC_LINK_PRIVILEGE,