| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This is a pointer to authentication or authorization data. It is defined as follows:
typedef int (*mu_auth_fp) (struct mu_auth_data **return_data,
void *key,
void *func_data,
void *call_data);
|
Its arguments are:
mu_auth_data structure
with the user's information.
For authentication handlers this argument is always NULL and
should be ignored.
For authorization handlers it is const char* if the handler is called by
mu_get_auth_by_name() and uid_t * if it is called by
mu_get_auth_by_uid().
For authentication handlers it is always struct mu_auth_data*
representing the user's data obtained by a previous call to a
mu_get_auth_by_... function.
The mu_auth_data is used to return the information about the
user. It is similar to system struct passwd, except that it
is more mailutils-specific. Its definition is:
struct mu_auth_data {
/* These are from struct passwd */
char *name; /* user name */
char *passwd; /* user password */
uid_t uid; /* user id */
gid_t gid; /* group id */
char *gecos; /* real name */
char *dir; /* home directory */
char *shell; /* shell program */
/* */
char *mailbox; /* Path to the user's system mailbox */
int change_uid; /* Should the uid be changed? */
};
|
The mu_auth_module structure contains full information about a
libmuauth module. It is declared as follows:
struct mu_auth_module {
char *name; /* Module name */
struct argp *argp; /* Corresponding argp structure */
mu_auth_fp authenticate; /* Authentication function ... */
void *authenticate_data; /* ... and its specific data */
mu_auth_fp auth_by_name; /* Get user info by user name */
void *auth_by_name_data; /* ... and its specific data */
mu_auth_fp auth_by_uid; /* Get user info by user id */
void *auth_by_uid_data; /* ... and its specific data */
};
|
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |