diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2007-01-15 11:01:23 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2007-01-15 11:01:23 +0000 |
commit | 5d93eb069ea8590893ce7961e9bb00123905271f (patch) | |
tree | 2dd9ebeed31b9e0757ced0674f7c665279be8d16 | |
parent | 5d1dd9308d891fe788af00b07218cc01e0983b8d (diff) | |
download | cygnal-5d93eb069ea8590893ce7961e9bb00123905271f.tar.gz cygnal-5d93eb069ea8590893ce7961e9bb00123905271f.tar.bz2 cygnal-5d93eb069ea8590893ce7961e9bb00123905271f.zip |
* cygheap.cc (cygheap_init): Add TODO comment.
-rw-r--r-- | winsup/cygwin/ChangeLog | 4 | ||||
-rw-r--r-- | winsup/cygwin/cygheap.cc | 23 | ||||
-rw-r--r-- | winsup/cygwin/ntdll.h | 2 |
3 files changed, 28 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index b0f650f42..75678260d 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,9 @@ 2007-01-14 Corinna Vinschen <corinna@vinschen.de> + * cygheap.cc (cygheap_init): Add TODO comment. + +2007-01-14 Corinna Vinschen <corinna@vinschen.de> + * ntdll.h (STATUS_SHARING_VIOLATION): Define. 2007-01-13 Corinna Vinschen <corinna@vinschen.de> diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc index caeda7b3a..c55dce9d4 100644 --- a/winsup/cygwin/cygheap.cc +++ b/winsup/cygwin/cygheap.cc @@ -162,6 +162,29 @@ cygheap_init () if (!cygheap->sigs) sigalloc (); + /* TODO: This is plain wrong. There's a difference between global shared + memory and every other global object. It's still allowed to + create any global object from a process not having the + SE_CREATE_GLOBAL_NAME privilege. It's only disallowed to create + global shared memory objects when not running in session 0 or + when not having the privilege. + + The end result should look like this: + - All objects shared between multiple processes except shared + memory should always be created as global objects. + - Shared memory only needed locally should stick to being session + local. + - Every process should always try to create resp. open shared + memory as global. + - Only if that fails it should try to create the shared memory + as local shared memory, or ... + - ... the MS suggested workaround is to create a file backed shared + memory if a process has not the privilege to create global shared + memory. + + However, this has to be planned carefully, especially given that + every single process creates its own (resp. the child's) shared + memory area with the process specific information. */ if (!cygheap->shared_prefix) cygheap->shared_prefix = cstrdup ( wincap.has_terminal_services () diff --git a/winsup/cygwin/ntdll.h b/winsup/cygwin/ntdll.h index 8345fae36..35c2a9bca 100644 --- a/winsup/cygwin/ntdll.h +++ b/winsup/cygwin/ntdll.h @@ -1,6 +1,6 @@ /* ntdll.h. Contains ntdll specific stuff not defined elsewhere. - Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006 Red Hat, Inc. + Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Red Hat, Inc. This file is part of Cygwin. |