Data Structures | |
struct | _Entrance_Auth |
Collection of data relating to authenticating off of the system. More... | |
Defines | |
#define | AUTH_SUCCESS 0 |
#define | E_SUCCESS 0 |
#define | AUTH_FAIL 1 |
#define | ERROR_NO_PAM_INIT 2 |
#define | ERROR_BAD_PASS 3 |
#define | ERROR_PAM_SET 4 |
#define | ERROR_NO_PERMS 5 |
#define | ERROR_CRED_EXPIRED 6 |
#define | ERROR_BAD_CRED 7 |
Typedefs | |
typedef struct _Entrance_Auth | Entrance_Auth |
Functions | |
Entrance_Auth * | entrance_auth_new (void) |
entrance_auth_new | |
void | entrance_auth_free (Entrance_Auth *e) |
entrance_auth_free the Entrance_Auth struct to be freed | |
void | entrance_auth_session_end (Entrance_Auth *e) |
entrance_auth_session_end the Entrance_Auth handle for this session | |
void | entrance_auth_clear_pass (Entrance_Auth *e) |
entrance_auth_clear_pass - Clear password from memory the Entrance_Auth handle for this session | |
int | entrance_auth_cmp (Entrance_Auth *e, const char *display, int mode) |
void | entrance_auth_pass_set (Entrance_Auth *e, const char *str) |
entrance_auth_set_pass: keep the error checking here Pass it a char* and it'll set it if it should | |
int | entrance_auth_user_set (Entrance_Auth *e, const char *str) |
set the username in the struct | |
void | entrance_auth_setup_environment (Entrance_Auth *e, const char *display) |
entrance_auth_setup_environment - setup the users environment the Entrance_Auth to setup I'm not sure if this is correct, but for now it works. | |
void | entrance_auth_reset (Entrance_Auth *e) |
entrance_auth_reset the Entrance_Auth struct to be reset |
#define AUTH_FAIL 1 |
Referenced by entrance_auth_cmp().
#define AUTH_SUCCESS 0 |
Referenced by entrance_auth_cmp_crypt().
#define E_SUCCESS 0 |
#define ERROR_BAD_CRED 7 |
#define ERROR_BAD_PASS 3 |
Referenced by entrance_auth_cmp_crypt().
#define ERROR_CRED_EXPIRED 6 |
#define ERROR_NO_PAM_INIT 2 |
#define ERROR_NO_PERMS 5 |
#define ERROR_PAM_SET 4 |
typedef struct _Entrance_Auth Entrance_Auth |
void entrance_auth_clear_pass | ( | Entrance_Auth * | e | ) |
entrance_auth_clear_pass - Clear password from memory the Entrance_Auth handle for this session
References _Entrance_Auth::pass, and _Entrance_Auth::pw.
int entrance_auth_cmp | ( | Entrance_Auth * | e, | |
const char * | display, | |||
int | mode | |||
) |
References AUTH_FAIL, entrance_auth_cmp_crypt(), ENTRANCE_USE_CRYPT, ENTRANCE_USE_PAM, and ENTRANCE_USE_SHADOW.
Referenced by entrance_session_auth_user().
void entrance_auth_free | ( | Entrance_Auth * | e | ) |
entrance_auth_free the Entrance_Auth struct to be freed
References entrance_auth_session_end(), _Entrance_Auth::env, _Entrance_Auth::pass, _Entrance_Auth::pw, struct_passwd_free(), and _Entrance_Auth::user.
Referenced by entrance_session_free(), entrance_session_start_user_session(), and entrance_session_user_reset().
Entrance_Auth* entrance_auth_new | ( | void | ) |
entrance_auth_new
Referenced by entrance_session_new(), and entrance_session_user_reset().
void entrance_auth_pass_set | ( | Entrance_Auth * | e, | |
const char * | str | |||
) |
entrance_auth_set_pass: keep the error checking here Pass it a char* and it'll set it if it should
References _Entrance_Auth::pass.
Referenced by entrance_session_pass_set().
void entrance_auth_reset | ( | Entrance_Auth * | e | ) |
entrance_auth_reset the Entrance_Auth struct to be reset
References _Entrance_Auth::pass, _Entrance_Auth::pw, struct_passwd_free(), and _Entrance_Auth::user.
void entrance_auth_session_end | ( | Entrance_Auth * | e | ) |
entrance_auth_session_end the Entrance_Auth handle for this session
Referenced by entrance_auth_free().
void entrance_auth_setup_environment | ( | Entrance_Auth * | e, | |
const char * | display | |||
) |
entrance_auth_setup_environment - setup the users environment the Entrance_Auth to setup I'm not sure if this is correct, but for now it works.
References _Entrance_Auth::env, and _Entrance_Auth::pw.
Referenced by entrance_session_setup_user_session(), and entrance_session_start_user_session().
int entrance_auth_user_set | ( | Entrance_Auth * | e, | |
const char * | str | |||
) |
set the username in the struct
e | - the Entrance_Auth to set the user of | |
str | - a string to set the user to, NULL is fine |
References _Entrance_Auth::pass, _Entrance_Auth::pw, struct_passwd_dup(), struct_passwd_free(), and _Entrance_Auth::user.
Referenced by entrance_session_user_set().