#include <dchroot-session-base.h>
Inheritance diagram for dchroot::session_base:


Public Member Functions | |
| session_base (std::string const &service, config_ptr &config, operation operation, sbuild::string_list const &chroots, bool compat) | |
| The constructor. | |
| virtual | ~session_base () |
| The destructor. | |
| bool | get_compat () const |
| Get the dchroot compatibility state. | |
| void | set_compat (bool state) |
| Set the dchroot compatibility state. | |
Protected Member Functions | |
| virtual void | run_impl () |
| Run a session. | |
| virtual sbuild::string_list | get_command_directories () const |
| Get a list of directories to change to when running a command Multiple directories are used as fallbacks. | |
Private Attributes | |
| bool | compat |
| dchroot compatibility enabled? | |
This class provides common session functionality for dchroot and dchroot-dsa, such as providing a schroot compatibility mode. It also prevents user switching when running sessions, which is forbidden.
| session_base::session_base | ( | 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). |
| session_base::~session_base | ( | ) | [virtual] |
The destructor.
| sbuild::string_list session_base::get_command_directories | ( | ) | const [protected, virtual] |
Get a list of directories to change to when running a command Multiple directories are used as fallbacks.
Reimplemented from sbuild::session.
| bool session_base::get_compat | ( | ) | const |
Get the dchroot compatibility state.
| void session_base::run_impl | ( | ) | [protected, virtual] |
Run a session.
If a command has been specified, this will be run in each of the specified chroots. If no command has been specified, a login shell will run in the specified chroot.
An error will be thrown on failure.
Reimplemented from sbuild::session.
| void session_base::set_compat | ( | bool | state | ) |
Set the dchroot compatibility state.
| state | the dchroot compatibility state. |
bool dchroot::session_base::compat [private] |
dchroot compatibility enabled?
1.4.7