Section (3) pam_get_user
returns the name of the user specified by pam_start(3). If no user
was specified it what
(pamh, PAM_USER, ... ); would have returned. If this
is NULL it obtains the username via the pam_conv(3) mechanism, it
prompts the user with the first non-NULL string in the
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()_zsingle_quotesz_d or modified by the module.
User name was successful retrieved.
A NULL pointer was submitted.
The conversation method supplied by the application failed to obtain the username.