pam_get_user (3)
Leading comments
Title: pam_get_user Author: [FIXME: author] [see http://docbook.sf.net/el/author] Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/> Date: 09/19/2013 Manual: Linux-PAM Manual Source: Linux-PAM Manual Language: English
NAME
pam_get_user - get user nameSYNOPSIS
#include <security/pam_modules.h>
- int pam_get_user(const pam_handle_t *pamh, const char **user, const char *prompt);
DESCRIPTION
- * The prompt argument passed to the function.
- * What is returned by pam_get_item (pamh, PAM_USER_PROMPT, ... );
- * The default prompt: "login: "
By whatever means the username is obtained, a pointer to it is returned as the contents of *user. Note, this memory should not be free()'d or modified by the module.
This function sets the PAM_USER item associated with the pam_set_item(3) and pam_get_item(3) functions.
RETURN VALUES
PAM_SUCCESS
- User name was successful retrieved.
PAM_SYSTEM_ERR
- A NULL pointer was submitted.
PAM_CONV_ERR
- The conversation method supplied by the application failed to obtain the username.
SEE ALSO
pam_end(3), pam_get_item(3), pam_set_item(3), pam_strerror(3)