Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:11.4:Update
autofs
autofs-5.0.6-fix-segfault-in-get_query_dn.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File autofs-5.0.6-fix-segfault-in-get_query_dn.patch of Package autofs
autofs-5.0.6 - fix segfault in get_query_dn() From: Leonardo Chiquitto <leonardo.lists@gmail.com> Automount will segfault when two threads run get_query_dn() simultaneously and $SEARCH_BASE is defined in sysconfig. This happens because a thread tries to dereference ctxt->sdns while another thread running the same function frees the memory. I believe we don't need to reread $SEARCH_BASE every time get_query_dn() is called. edit: Ian Kent <raven@themaw.net> move the read of configured search dns to lookup_init(). edit end --- modules/lookup_ldap.c | 13 +++---------- 1 files changed, 3 insertions(+), 10 deletions(-) Index: autofs-5.0.5/modules/lookup_ldap.c =================================================================== --- autofs-5.0.5.orig/modules/lookup_ldap.c +++ autofs-5.0.5/modules/lookup_ldap.c @@ -280,7 +280,6 @@ static int get_query_dn(unsigned logopt, char buf[MAX_ERR_BUF]; char *query, *dn, *qdn; LDAPMessage *result = NULL, *e; - struct ldap_searchdn *sdns = NULL; char *attrs[2]; struct berval **value; int scope; @@ -329,15 +328,6 @@ static int get_query_dn(unsigned logopt, scope = LDAP_SCOPE_SUBTREE; } - if (!ctxt->base) { - sdns = defaults_get_searchdns(); - if (sdns) { - if (ctxt->sdns) - defaults_free_searchdns(ctxt->sdns); - ctxt->sdns = sdns; - } - } - dn = NULL; if (!ctxt->sdns) { rv = ldap_search_s(ldap, ctxt->base, @@ -1446,6 +1436,9 @@ int lookup_init(const char *mapfmt, int return 1; } + if (!ctxt->base) + ctxt->sdns = defaults_get_searchdns(); + ctxt->timeout = defaults_get_ldap_timeout(); ctxt->network_timeout = defaults_get_ldap_network_timeout();
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor