From: Magnus Hagander Date: Tue, 25 Oct 2016 15:12:49 +0000 (+0200) Subject: Make pam_init happen in the child process when forking X-Git-Tag: pgbouncer_1_8~41^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cb7a8eb8f6cd6ff3507514bcddd3c1e3d1ecba9a;p=pgbouncer Make pam_init happen in the child process when forking Previously, pam_init would happen in the master process that then quickly died, rendering pam authentication inoperative. --- diff --git a/src/main.c b/src/main.c index 48e0056..d7429e0 100644 --- a/src/main.c +++ b/src/main.c @@ -891,7 +891,6 @@ int main(int argc, char *argv[]) check_limits(); admin_setup(); - pam_init(); if (cf_reboot) { if (check_old_process_unix()) { @@ -920,6 +919,8 @@ int main(int argc, char *argv[]) janitor_setup(); stats_setup(); + pam_init(); + if (did_takeover) { takeover_finish(); } else {