19 #ifndef SBUILD_AUTH_PAM_CONV_TTY_H
20 #define SBUILD_AUTH_PAM_CONV_TTY_H
22 #include <sbuild/auth/pam-conv.h>
23 #include <sbuild/auth/auth.h>
24 #include <sbuild/custom-error.h>
26 #include <security/pam_appl.h>
27 #include <security/pam_misc.h>
Authentication conversation handler interface.
Definition: pam-conv.h:59
weak_auth_ptr auth
The auth object.
Definition: pam-conv-tty.h:141
custom_error< error_code > error
Exception type.
Definition: pam-conv-tty.h:62
std::shared_ptr< pam_conv > ptr
A shared_ptr to an pam_conv object.
Definition: pam-conv.h:69
error_code
Error codes.
Definition: pam-conv-tty.h:52
Debian source builder components.
Definition: ctty.cc:31
std::weak_ptr< pam > weak_auth_ptr
A weak pointer to an pam object.
Definition: pam-conv.h:67
time_t start_time
The time the current delay was obtained at.
Definition: pam-conv-tty.h:147
std::shared_ptr< pam > auth_ptr
A shared pointer to an pam object.
Definition: pam-conv.h:65
virtual ~pam_conv_tty()
The destructor.
Definition: pam-conv-tty.cc:124
time_t fatal_timeout
The time to end at.
Definition: pam-conv-tty.h:145
Unsupported conversation type.
Definition: pam-conv-tty.h:58
virtual void set_auth(auth_ptr auth)
Set the auth object.
Definition: pam-conv-tty.cc:141
pam_conv_tty(auth_ptr auth)
The constructor.
Definition: pam-conv-tty.cc:116
Failed to get terminal settings.
Definition: pam-conv-tty.h:57
Time is running out...
Definition: pam-conv-tty.h:56
virtual auth_ptr get_auth()
Get the auth object.
Definition: pam-conv-tty.cc:135
Custom error.
Definition: custom-error.h:31
Authentication conversation handler for terminal devices.
Definition: pam-conv-tty.h:48
Timed out.
Definition: pam-conv-tty.h:55
std::vector< pam_message > message_list
A list of messages.
Definition: pam-conv.h:63
virtual void conversation(pam_conv::message_list &messages)
Hold a conversation with the user.
Definition: pam-conv-tty.cc:292
virtual void set_fatal_timeout(time_t timeout)
Set the time at which the conversation will be terminated with an error.
Definition: pam-conv-tty.cc:165
std::string read_string(std::string message, bool echo)
Read user input from standard input.
Definition: pam-conv-tty.cc:198
static ptr create(auth_ptr auth)
Create an pam_conv_tty object.
Definition: pam-conv-tty.cc:129
virtual time_t get_warning_timeout()
Get the time at which the user will be warned.
Definition: pam-conv-tty.cc:147
time_t warning_timeout
The time to warn at.
Definition: pam-conv-tty.h:143
Authentication handler.
Definition: auth.h:74
virtual time_t get_fatal_timeout()
Get the time at which the conversation will be terminated with an error.
Definition: pam-conv-tty.cc:159
virtual void set_warning_timeout(time_t timeout)
Set the time at which the user will be warned.
Definition: pam-conv-tty.cc:153
No controlling terminal.
Definition: pam-conv-tty.h:54
int get_delay()
Get the time delay before the next SIGALRM signal.
Definition: pam-conv-tty.cc:171