summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorRoger Leigh <rleigh@debian.org>2010-02-20 12:40:23 +0000
committerRoger Leigh <rleigh@debian.org>2010-02-20 12:40:23 +0000
commite981d845815a413c758751f821fe95d1d510f04f (patch)
treeb34250b7964227007a8d6eb4e20c260783e0a0bd /bin
parent08dc32bf62e74936752873c7fcd0fd0a75e0b955 (diff)
downloadschroot-e981d845815a413c758751f821fe95d1d510f04f.tar.gz
schroot::main_base: Set PAM conversation handler
Diffstat (limited to 'bin')
-rw-r--r--bin/schroot/schroot-main-base.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/schroot/schroot-main-base.cc b/bin/schroot/schroot-main-base.cc
index 2d8894e3..66cf6832 100644
--- a/bin/schroot/schroot-main-base.cc
+++ b/bin/schroot/schroot-main-base.cc
@@ -333,16 +333,18 @@ main_base::add_session_auth ()
#ifdef SBUILD_FEATURE_PAM
sbuild::auth::ptr auth = sbuild::auth_pam::create("schroot");
- sbuild::auth_pam_conv_tty::auth_ptr auth_ptr =
+ sbuild::auth_pam_conv::auth_ptr pam_auth =
std::tr1::dynamic_pointer_cast<sbuild::auth_pam>(auth);
- sbuild::auth_pam_conv::ptr conv = sbuild::auth_pam_conv_tty::create(auth_ptr);
+ sbuild::auth_pam_conv::ptr conv = sbuild::auth_pam_conv_tty::create(pam_auth);
+
/* Set up authentication timeouts. */
time_t curtime = 0;
time(&curtime);
conv->set_warning_timeout(curtime + 15);
conv->set_fatal_timeout(curtime + 20);
+ pam_auth->set_conv(conv);
this->session->set_auth(auth);
#endif // SBUILD_FEATURE_PAM