[users@httpd] [Fix:] ladap crash on exit (Bug #31366)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello there!

I think I've fixed this bug.

It's util_ldap_cache.c:util_ldap_cache_module_kill()
...
if (st->cache_shm != NULL) {
    apr_status_t result = apr_shm_destroy(st->cache_shm);
	st->cache_shm = NULL;
        apr_file_remove(st->cache_file, st->pool);

It should be checked either we do have cache file befor attempt to delete it.
Because initially it is NULL and it remains null unless
LDAPSharedCacheFile is set in config. And if shared memory has been
initialized it does not mean that file has been created.
This bug appears only on Win because Win attempts to recode the string
(file name) to Unicode and null reference fails in this function.

This works for me:
if (st->cache_shm != NULL) {
    apr_status_t result = apr_shm_destroy(st->cache_shm);
	st->cache_shm = NULL;
	if(st->cache_file != NULL) {
	    apr_file_remove(st->cache_file, st->pool);
		st->cache_file = NULL;


This works for the situation when there is no LDAPSharedCacheFile
attribute in config.
But when there is one, it still crashes. I'm looking ito it.

Brgds
Vadim Chekan.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux