#include <sbuild-auth-null.h>


Public Member Functions | |
| virtual | ~auth_null () |
| The destructor. | |
| virtual environment | get_auth_environment () const |
| Get the PAM environment. | |
| virtual void | start () |
| Start the PAM system. | |
| virtual void | stop () |
| Stop the PAM system. | |
| virtual void | authenticate (status auth_status) |
| Perform PAM authentication. | |
| virtual bool | is_initialised () const |
| Check if PAM is initialised (i.e. | |
Static Public Member Functions | |
| static auth::ptr | create (std::string const &service_name) |
| Create an auth_null object. | |
Protected Attributes | |
| bool | initialised |
| Is the serive initialised? | |
| environment | auth_environment |
| Minimal environment. | |
Private Member Functions | |
| auth_null (std::string const &service_name) | |
| The constructor. | |
auth_null handles user authentication, authorisation and session management. Unlike auth_pam, it does nothing. All attempts to authenticate will fail.
| auth_null::auth_null | ( | std::string const & | service_name | ) | [private] |
The constructor.
| service_name | the PAM service name. This should be a hard-coded constant string literal for safety and security. This is passed to pam_start() when initialising PAM, and is used to load the correct configuration file from /etc/pam.d. |
Referenced by create().

| auth::ptr auth_null::create | ( | std::string const & | service_name | ) | [static] |
Create an auth_null object.
| service_name | the PAM service name. This should be a hard-coded constant string literal for safety and security. This is passed to pam_start() when initialising PAM, and is used to load the correct configuration file from /etc/pam.d. |
References auth_null().
| environment auth_null::get_auth_environment | ( | ) | const [virtual] |
Get the PAM environment.
This is the environment as set by PAM modules.
Implements sbuild::auth.
References sbuild::auth::get_minimal_environment().
| void auth_null::start | ( | ) | [virtual] |
Start the PAM system.
No other PAM functions may be called before calling this function.
An error will be thrown on failure.
Reimplemented from sbuild::auth.
References sbuild::DEBUG_CRITICAL, initialised, sbuild::log_debug(), sbuild::auth::PAM_DOUBLE_INIT, and sbuild::auth::user.
| void auth_null::stop | ( | ) | [virtual] |
Stop the PAM system.
No other PAM functions may be used after calling this function.
An error will be thrown on failure.
Reimplemented from sbuild::auth.
References initialised.
Referenced by ~auth_null().

| void auth_null::authenticate | ( | status | auth_status | ) | [virtual] |
Perform PAM authentication.
If auth_status is set to AUTH_USER, the user will be prompted to authenticate themselves. If auth_status is AUTH_NONE, no authentication is required, and if AUTH_FAIL, authentication will fail.
An error will be thrown on failure.
| auth_status | initial authentication status. |
Reimplemented from sbuild::auth.
References sbuild::auth::AUTHENTICATION, sbuild::auth::AUTHORISATION, sbuild::DEBUG_INFO, initialised, sbuild::log_debug(), sbuild::auth::ruid, sbuild::auth::ruser, sbuild::auth::service, sbuild::auth::STATUS_FAIL, sbuild::auth::STATUS_NONE, sbuild::auth::STATUS_USER, and sbuild::auth::user.
| bool auth_null::is_initialised | ( | ) | const [virtual] |
Check if PAM is initialised (i.e.
start has been called).
Implements sbuild::auth.
References initialised.
1.5.6