Node:Obtaining Authorization Information, Next:, Previous:Module Creation and Destruction, Up:libmuauth



Obtaining Authorization Information

int mu_auth_runlist (list_t flist, void *return_data, void *key, void *call_data); Function

The list is expected to contain mu_auth_fp pointers. Each of them is dereferenced and executed until either the list is exhausted or any of the functions returns non-zero, whichever occurs first. The return_data and key arguments are passed as the first two parameters to the function (see the definition of mu_auth_fp, notice the footnote), the call_data is passed as its last parameter.

The function returns 0 if none of the functions from list succeeded, i.e. returned non-zero value. Otherwise it returns the return code from the succeeded function.

struct mu_auth_data * mu_get_auth_by_name (const char *username) Function

Search the information about given user by its username. Similar to system's getpwnam call).

struct mu_auth_data * mu_get_auth_by_uid (uid_t uid) Function
Search the information about given user by its uid. Similar to system's getpwuid call).

int mu_authenticate (struct mu_auth_data *auth_data, char *pass) Function

Authenticate the user whose data are in auth_data using password pass. Return 0 if the user is authenticated.