|Summary:||Questionable use of "Global" objects on Windows|
|Product:||Tomcat Connectors||Reporter:||Rainer Jung <rainer.jung>|
|Component:||Common||Assignee:||Tomcat Developers Mailing List <dev>|
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.