Any available sys-auth/pam_mysql package has a memory leak as some MySQL library memory is not getting freed. When being used with saslauthd (dev-libs/cyrus-sasl) pam_mysql eats all memory until the oom-killer hits the machine. A patch is available in the additional information field. Unfortunately the pam_mysql ebuilds also are missing support for user patches (src_prepare()/epatch_user call missing). Reproducible: Always Steps to Reproduce: 1. Install. 2. Configure saslauthd to use pam_mysql for authentication. 3. Depending on the number of authentication sessions watch the available memory decrease over time. Actual Results: saslauthd/pam_mysql ate over 4GB of memory after a few weeks. Expected Results: Allocated memory should be freed completely when the authentication is through. --- pam_mysql.c.orig 2006-01-09 11:35:59.000000000 +0100 +++ pam_mysql.c 2011-04-22 09:11:52.037063001 +0200 @@ -2338,6 +2338,7 @@ } mysql_close(ctx->mysql_hdl); + mysql_library_end(); xfree(ctx->mysql_hdl); ctx->mysql_hdl = NULL;
thanks for the report, fixed