From d8fdea659ecef6e8ede5cfba19e1b2387a586cc8 Mon Sep 17 00:00:00 2001 From: dtucker Date: Tue, 11 Mar 2008 11:58:25 +0000 Subject: - (dtucker) [auth-pam.c monitor.c session.c sshd.c] Bug #926: Move pam_open_session and pam_close_session into the privsep monitor, which will ensure that pam_session_close is called as root. Patch from Tomas Mraz. --- monitor.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'monitor.c') diff --git a/monitor.c b/monitor.c index 2f23669c..cc0e0fca 100644 --- a/monitor.c +++ b/monitor.c @@ -1547,6 +1547,11 @@ mm_answer_term(int sock, Buffer *req) /* The child is terminating */ session_destroy_all(&mm_session_close); +#ifdef USE_PAM + if (options.use_pam) + sshpam_cleanup(); +#endif + while (waitpid(pmonitor->m_pid, &status, 0) == -1) if (errno != EINTR) exit(1); -- cgit v1.2.1