[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: maildap on Solaris abends on sprintf (ITS#1022)
Changing the second format character from "s" to "p" has solved the
Solaris problem (syslog statements are user added):
if ( domainpart ) {
syslog(LOG_INFO,"***** 'if ( domainpart )' *****");
sprintf( address, "%s@%p", localpart, domainpart );
free( localpart );
free( domainpart );
} else {
syslog(LOG_INFO,"***** '} else {' *****");
sprintf( address, "%s@%p", localpart, domainpart );
syslog(LOG_INFO,"--- after sprintf, before 'free(localpart)' ---
");
free( localpart );
}
syslog(LOG_INFO,"--- call 'do_address' ---");
do_address( address, &tolist, &numto, &togroups, &ngroups,
&errlist, &numerr, type );
Note: making the same change in FreeBSD-4.1, OpenLDAP-2.07, doesn't
appear to affect the outcome - it still works. The extra debugging lines
that I added just before the LDAP search is performed, however, displays
via syslog what may be a raw pointer for the attributes array. Mail
delivery still works, however.
res = NULL;
/* additional debug output to verify search parms */
if ( debug ) {
syslog(LOG_INFO, "--- ldap_search:");
syslog(LOG_INFO, "--- dn[%s]", ludp->lud_dn);
syslog(LOG_INFO, "--- scope[%d]",ludp->lud_scope);
syslog(LOG_INFO, "--- filter[%s]",filter);
syslog(LOG_INFO, "--- attrlist[%s]",attrlist);
}
/* TBC: we don't read the host, dammit */
rc = ldap_search_st( ld, ludp->lud_dn, ludp->lud_scope,
filter, attrlist, 0,
&timeout, &res );
/* some other trouble - try again later */
if ( rc != LDAP_SUCCESS &&