]> granicus.if.org Git - pgbouncer/commitdiff
Make pam_init happen in the child process when forking
authorMagnus Hagander <magnus@hagander.net>
Tue, 25 Oct 2016 15:12:49 +0000 (17:12 +0200)
committerMagnus Hagander <magnus@hagander.net>
Tue, 25 Oct 2016 15:12:49 +0000 (17:12 +0200)
Previously, pam_init would happen in the master process that then
quickly died, rendering pam authentication inoperative.

src/main.c

index 48e0056be5258476dc15510cb0f9486db2259ae7..d7429e057d82fe2bd188b972e4d83dcccaa98927 100644 (file)
@@ -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 {