|
GNU Mailutils |
General-Purpose Mail Package |
Official GNU Software |
| GNU Mailutils Manual (split by node): | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
? |
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:
Upon successful return authorization handler leaves in this memory
location a pointer to the filled mu_auth_data structure
with the user's information.
For authentication handlers this argument is always NULL and
should be ignored.
The search key value. Its actual type depends upon type of the handler.
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.
Any data associated with this handler.
Any call specific data. This argument is not used at the moment.
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
libmu_auth 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 */
};
|
| GNU Mailutils Manual (split by node): | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
? |
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.