backend.h File Reference
#include "pam_kmux_options.h"
Go to the source code of this file.
Functions |
| int | exec_param (const char *service, const char *user, const char *newpass, const char *rhost, const modopt_t *options) |
| | Start the right exec_param function in dependency of the database-type.
|
| int | exec_params (const char *service, const char *user, const char *newpass, const char *rhost, const modopts_t *options_container) |
| | This function is a wrapper for exec_param.
|
| int | backend_authenticate (const char *service, const char *user, const char *passwd, const char *rhost, const modopt_t *options) |
| | Start the right backend_authenticate function in dependency of the database-type.
|
| int | backends_authenticate (const char *service, const char *user, const char *passwd, const char *rhost, const modopts_t *options_container) |
| | This function is a wrapper for backend_authenticate.
|
Function Documentation
| int backend_authenticate |
( |
const char * |
service, |
|
|
const char * |
user, |
|
|
const char * |
passwd, |
|
|
const char * |
rhost, |
|
|
const modopt_t * |
options | |
|
) |
| | |
Start the right backend_authenticate function in dependency of the database-type.
This function finds out the database type given by the modopt_t *options object and run a authentification query on it.
- Parameters:
-
| service | Character array. |
| user | Character array contains username/uid of the user that tries to change password. |
| passwd | Character array contains the password of the user. |
| rhost | Character array contains the value of PAM_RHOST. This is only needed if you need somethin like this in your defined queries. |
| options | Struct which represents exactly one database connection. |
- Return values:
-
| PAM_SUCCESS | Successfully authenticate against backend. |
| PAM_AUTH_ERR | Malformed options (passwd, options or user = NULL), connection error during dial-up, password comarison between database-stored-password and entered password fails, or query expandation fails. |
| PAM_AUTHINFO_UNAVAIL | Fetched no valid result. |
| int backends_authenticate |
( |
const char * |
service, |
|
|
const char * |
user, |
|
|
const char * |
passwd, |
|
|
const char * |
rhost, |
|
|
const modopts_t * |
options_container | |
|
) |
| | |
This function is a wrapper for backend_authenticate.
It calls backend_authenticate for every modopt_t struct which is contained by the array of modopt_t structs contained by the modopts_t struct options_container.
- Parameters:
-
| service | Character array. |
| user | Character array contains username/uid of the user that tries to change password. |
| passwd | Character array contains the password of the user. |
| rhost | Character array contains the value of PAM_RHOST. This is only needed if you need somethin like this in your defined queries. |
| options_container | Struct which represents a collection of database connections. |
- Return values:
-
| PAM_SUCCESS | Successfully authenticate against backend. |
| PAM_AUTH_ERR | Malformed options (passwd, options or user = NULL), connection error during dial-up password comarison between database-stored-password and entered password fails, or query expandation fails. |
| PAM_AUTHINFO_UNAVAIL | Fetched no valid result. |
| int exec_param |
( |
const char * |
service, |
|
|
const char * |
user, |
|
|
const char * |
newpass, |
|
|
const char * |
rhost, |
|
|
const modopt_t * |
options | |
|
) |
| | |
Start the right exec_param function in dependency of the database-type.
This function tries to find out the database type given by the modopt_t *options object and run a query on it.
- Parameters:
-
| service | Service name character array. |
| user | Character array which contains username/uid of the user that tries to change password. |
| newpass | Contains new cleartext array of user. |
| rhost | Character array contains the value of PAM_RHOST. This is only needed if you need something like this in your defined queries. |
| options | Struct which represents exactly one database connection. |
- Return values:
-
| PAM_SUCCESS | Successfully executed query. |
| PAM_AUTH_ERR | Failure durin password encryption. |
Encrypt password with the hastype specified in the struct options
| int exec_params |
( |
const char * |
service, |
|
|
const char * |
user, |
|
|
const char * |
newpass, |
|
|
const char * |
rhost, |
|
|
const modopts_t * |
options_container | |
|
) |
| | |
This function is a wrapper for exec_param.
It calls exec_param for every modopt_t struct which is contained by the list of modopt_t structs contained by the modopts_t struct options_container.
- Parameters:
-
| service | character array. |
| user | Character array contains username/uid of the user that tries to change password. |
| newpass | Contains new cleartext array of user. |
| rhost | Character array contains the value of PAM_RHOST. This is only needed if you need something like this in your defined queries. |
| options_container | Struct which represents a collection of database connections. |
- Return values:
-
| PAM_SUCCESS | Successfully executed query. |
| PAM_AUTH_ERR | Failure durin password encryption. |