#include <dchroot-session.h>
Inheritance diagram for dchroot::session:
Public Member Functions | |
session (std::string const &service, config_ptr &config, operation operation, sbuild::string_list const &chroots, bool compat) | |
The constructor. | |
virtual | ~session () |
The destructor. | |
virtual sbuild::auth::status | get_chroot_auth_status (sbuild::auth::status status, sbuild::chroot::ptr const &chroot) const |
virtual sbuild::string_list | get_login_directories () const |
virtual void | get_user_command (sbuild::chroot::ptr &session_chroot, std::string &file, sbuild::string_list &command) const |
This class provides the session handling for dchroot compatibility. It overrides the normal authentication checks to allow all users to access the service, and it specialises the session behaviour to be compatible with the chdir and command execution behaviour of dchroot.
Definition at line 37 of file dchroot-session.h.
session::session | ( | std::string const & | service, | |
config_ptr & | config, | |||
operation | operation, | |||
sbuild::string_list const & | chroots, | |||
bool | compat | |||
) |
The constructor.
service | the PAM service name. | |
config | a shared_ptr to the chroot configuration. | |
operation | the session operation to perform. | |
chroots | the chroots to act upon. | |
compat | true to enable full dchroot compatibility, or false to enable schroot compatiblity (permissions checks). |
Definition at line 43 of file dchroot-session.cc.
session::~session | ( | ) | [virtual] |
The destructor.
Reimplemented from sbuild::session.
Definition at line 52 of file dchroot-session.cc.
sbuild::auth::status session::get_chroot_auth_status | ( | sbuild::auth::status | status, | |
sbuild::chroot::ptr const & | chroot | |||
) | const [virtual] |
Reimplemented from sbuild::session.
Definition at line 57 of file dchroot-session.cc.
References sbuild::auth::change_auth(), sbuild::session::get_chroot_auth_status(), and dchroot::session_base::get_compat().
sbuild::string_list session::get_login_directories | ( | ) | const [virtual] |
Reimplemented from sbuild::session.
Definition at line 71 of file dchroot-session.cc.
References sbuild::auth::get_environment(), sbuild::auth::get_home(), sbuild::auth::get_wd(), and sbuild::auth::wd.
void session::get_user_command | ( | sbuild::chroot::ptr & | session_chroot, | |
std::string & | file, | |||
sbuild::string_list & | command | |||
) | const [virtual] |
Reimplemented from sbuild::session.
Definition at line 99 of file dchroot-session.cc.
References sbuild::DEBUG_NOTICE, sbuild::auth::get_ruid(), sbuild::auth::get_ruser(), sbuild::session::get_shell(), sbuild::auth::get_uid(), sbuild::auth::get_user(), sbuild::auth::get_verbosity(), sbuild::log_debug(), sbuild::log_info(), and sbuild::string_list_to_string().