Bug 58287 - Questionable use of "Global" objects on Windows
Summary: Questionable use of "Global" objects on Windows
Status: RESOLVED FIXED
Alias: None
Product: Tomcat Connectors
Classification: Unclassified
Component: Common (show other bugs)
Version: 1.2.41
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-26 20:21 UTC by Rainer Jung
Modified: 2018-08-21 17:39 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Jung 2015-08-26 20:21:17 UTC
In common/jk_shm.c and in iis/jk_isapi_plugin.c we create objects in the Windows "Global" name space. Those are used as names for mutexes and for shared memory. Creating global objects needs the privilege SeCreateGlobalPrivilege. It did not work for me when using a Windows binary of mod_jk inside httpd not running as a service. I has to add "run as administator" to the binary although the user already was in the administrator group.

I question the use of the global namespace. I can't see, why local should not be enough plus local would make conflicts between multiple instances less likely.

Do we see any reasons, why using Local\ insted of Global\ should not work (and even be better)? Especially for IIS I don't know enough about the various operating models.
Comment 1 Mark Thomas 2018-08-21 17:39:49 UTC
I've been doing some research:
https://docs.microsoft.com/en-gb/windows/desktop/TermServ/kernel-object-namespaces

Global essentially means all user sessions (including the system). Local means the current session. Local looks like the better choice to me. As a sanity check, I've changed it in my local build with no obvious issues with ISAPI.

Fixed in 1.2.x for 1.2.44 onwards.