krb5_get_instance() is meant to ensure that the shared library instance of heimdal loaded by a plugin matches the instance that loaded the plugin. It works by declaring a static C string whose memory address will be used as an instance identifier. If the instance returned from the plugin matches the instance obtain by the code that loads the plugin, then we can conclude the two instances are the same. This doesn't work on Windows 7. When heimdal.dll loads a plugin that is linked to heimdal.dll, the plugin's heimdal.dll is always a new instance. However, the requirement for plugin safety is not that the plugin be the same instance in memory but that they be the same instance on disk. This change loads the path name and version string for the module and generates a hash of those strings as an instance identifier. Change-Id: I1c0651969e9738c5feecb0b323969d13efd4704d
3.3 KiB
3.3 KiB