Univention Bugzilla – Bug 27727
pam-univentioncyrus: Speicherleck, falscher Formatstring, deprecated LDAP Funktionen
Last modified: 2012-07-20 15:24:57 CEST
Fix memory leak by calling univention_ldap_close() - lp = univention_ldap_new(); - lp->host = strdup(ldap_host); - lp->base = strdup(ldap_base); - lp->binddn = strdup(binddn); - lp->bindpw = strdup(bindpw); Fix formatstring for printing filter - _log_err(LOG_NOTICE, "Failed to query LDAP server: ", filter); Replace deprecated ldap_*() functions with ldap_*_ext() - ldap_search_s(lp->ld, ldap_base, LDAP_SCOPE_SUBTREE, filter, attrs, 0, &res) - ldap_get_values(lp->ld, entry, toattr) - ldap_count_values(values) - ldap_value_free(values)
Created attachment 4474 [details] memory leak, format string falsch, deprecated LDAP functions
# Zum testen /etc/init.d/saslauthd stop /usr/sbin/saslauthd -a pam -t 1 -c -r -m /var/run/saslauthd -n 1 -d &>/dev/null & ps -o pid=,rss= `pgrep saslauthd` # 3132 /usr/sbin/testsaslauthd -u phahn1@pmhahn.dev -p univention -R 20000 >/dev/null ps -o pid=,rss= `pgrep saslauthd` # 4800 /usr/sbin/testsaslauthd -u phahn2@pmhahn.dev -p univention -R 20000 >/dev/null ps -o pid=,rss= `pgrep saslauthd` # 4828 /usr/sbin/testsaslauthd -u phahn3@pmhahn.dev -p univention -R 20000 >/dev/null ps -o pid=,rss= `pgrep saslauthd` # 4852 pkill saslauthd dpkg -i ../libpam-univentionmailcyrus_4.0.4-1_amd64.deb /usr/sbin/saslauthd -a pam -t 1 -c -r -m /var/run/saslauthd -n 1 -d &>/dev/null & ps -o pid=,rss= `pgrep saslauthd` # 3132 /usr/sbin/testsaslauthd -u phahn1@pmhahn.dev -p univention -R 20000 >/dev/null ps -o pid=,rss= `pgrep saslauthd` # 4760 /usr/sbin/testsaslauthd -u phahn2@pmhahn.dev -p univention -R 20000 >/dev/null ps -o pid=,rss= `pgrep saslauthd` # 4764 /usr/sbin/testsaslauthd -u phahn3@pmhahn.dev -p univention -R 20000 >/dev/null ps -o pid=,rss= `pgrep saslauthd` # 4768 pkill saslauthd /etc/init.d/saslauthd start svn33719, pam-univentionmailcyrus_4.0.4-1.33.201206221946 ChangeLog: svn13609 \item A memory leak has been fixed in the Cyrus PAM module (\ucsBug{27727}).
Patch ist ok; Memoryleak konnte nachgestellt werden und ist mit Patch nicht mehr vorhanden; Authentifizierung funktioniert mit testsaslauthd und direkt über IMAP; weitere Memoryleaks ließen sich zunächst nicht provozieren; Changelogeintrag ist ok;
UCS 3.0-2 has been released: http://forum.univention.de/viewtopic.php?f=54&t=1905 If this error occurs again, please use "Clone This Bug".