Projects
home:connyhald:branches:Kolab:3.3:Updates
cyrus-imapd
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 7
View file
ptloader-segfault.patch
Changed
@@ -1,26 +1,78 @@ --- a/ptclient/ldap.c +++ b/ptclient/ldap.c -@@ -888,6 +888,8 @@ static int ptsmodule_get_dn( +@@ -888,6 +888,7 @@ static int ptsmodule_get_dn( LDAPControl c; LDAPControl *ctrl2; char *authzid; -+ syslog(LOG_WARNING, "SEGV: ptsmodule_get_dn() Using >= 20125"); + #endif char *base = NULL, *filter = NULL; char *domain = NULL; -@@ -901,6 +903,8 @@ static int ptsmodule_get_dn( +@@ -901,16 +902,21 @@ static int ptsmodule_get_dn( *ret = NULL; -+ syslog(LOG_WARNING, "SEGV: ptsmodule_get_dn() Using < 20125"); +- if (ptsm->ld == NULL) + - if (ptsm->ld == NULL) ++ if (ptsm->ld == NULL) { ++ syslog(LOG_WARNING, "SEGV: ptsm->ld == NULL. Return PTSM_FAIL."); return PTSM_FAIL; ++ } -@@ -1002,7 +1006,12 @@ static int ptsmodule_get_dn( - if (rc != PTSM_OK) + #if LDAP_VENDOR_VERSION >= 20125 + + if (ptsm->sasl) { + + authzid = xmalloc(size + sizeof("u:")); +- if (authzid == NULL) ++ if (authzid == NULL) { ++ syslog(LOG_WARNING, "SEGV: authzid == NULL. Return PTSM_NOMEM."); + return PTSM_NOMEM; ++ } + + strcpy(authzid, "u:"); + strcpy(authzid+2, canon_id); +@@ -927,8 +933,10 @@ static int ptsmodule_get_dn( + if (rc == LDAP_SERVER_DOWN) { + ldap_unbind(ptsm->ld); + ptsm->ld = NULL; ++ syslog(LOG_WARNING, "SEGV: rc == LDAP_SERVER_DOWN. Return PTSM_RETRY."); + return PTSM_RETRY; +- } ++ } ++ syslog(LOG_WARNING, "SEGV: rc != LDAP_SUCCESS. Return PTSM_FAIL."); + return PTSM_FAIL; + } + +@@ -943,8 +951,10 @@ static int ptsmodule_get_dn( + + { + rc = ptsmodule_expand_tokens(ptsm->filter, canon_id, NULL, &filter); +- if (rc != PTSM_OK) ++ if (rc != PTSM_OK) { ++ syslog(LOG_WARNING, "SEGV: rc != PTSM_OK. Return rc: %i", rc); + return rc; ++ } + + if (ptsm->domain_base_dn && ptsm->domain_base_dn0 != '\0' && (strrchr(canon_id, '@') != NULL)) { + syslog(LOG_DEBUG, "Attempting to get domain for %s from %s", canon_id, ptsm->domain_base_dn); +@@ -989,6 +999,7 @@ static int ptsmodule_get_dn( + } + + if (rc != PTSM_OK) { ++ syslog(LOG_WARNING, "SEGV: rc != PTSM_OK (2). Return rc: %i", rc); + return rc; + } else { + base = xstrdup(ptsm->base); +@@ -999,10 +1010,17 @@ static int ptsmodule_get_dn( + + } else { + rc = ptsmodule_expand_tokens(ptsm->base, canon_id, NULL, &base); +- if (rc != PTSM_OK) ++ if (rc != PTSM_OK) { ++ syslog(LOG_WARNING, "SEGV: rc != PTSM_OK (3). Return rc: %i", rc); return rc; ++ } } + + // Log parameters to find SIGV @@ -31,3 +83,23 @@ rc = ldap_search_st(ptsm->ld, base, ptsm->scope, filter, attrs, 0, &(ptsm->timeout), &res); if (rc != LDAP_SUCCESS) { +@@ -1013,9 +1031,11 @@ static int ptsmodule_get_dn( + if (rc == LDAP_SERVER_DOWN) { + ldap_unbind(ptsm->ld); + ptsm->ld = NULL; ++ syslog(LOG_WARNING, "SEGV: rc == LDAP_SERVER_DOWN. Return PTSM_RETRY."); + return PTSM_RETRY; + } + ++ syslog(LOG_WARNING, "SEGV: rc != LDAP_SUCCESS (2). Return PTSM_FAIL."); + return PTSM_FAIL; + } + +@@ -1041,6 +1061,7 @@ static int ptsmodule_get_dn( + res = NULL; + } + ++ syslog(LOG_WARNING, "SEGV: Reached last return. Ret: %s", (*ret ? ret : "NULL")); + return (*ret ? PTSM_OK : PTSM_FAIL); + } +
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.