summaryrefslogtreecommitdiff
path: root/doc/man/pam_get_user.3
diff options
context:
space:
mode:
Diffstat (limited to 'doc/man/pam_get_user.3')
-rw-r--r--doc/man/pam_get_user.369
1 files changed, 69 insertions, 0 deletions
diff --git a/doc/man/pam_get_user.3 b/doc/man/pam_get_user.3
new file mode 100644
index 00000000..a5bc9ebe
--- /dev/null
+++ b/doc/man/pam_get_user.3
@@ -0,0 +1,69 @@
+.\" ** You probably do not want to edit this file directly **
+.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
+.\" Instead of manually editing it, you probably should edit the DocBook XML
+.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
+.TH "PAM_GET_USER" "3" "02/14/2006" "Linux\-PAM Manual" "Linux\-PAM Manual"
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.SH "NAME"
+pam_get_user \- get user name
+.SH "SYNOPSIS"
+.PP
+\fB#include <security/pam_modules.h>\fR
+.HP 17
+\fBint\ \fBpam_get_user\fR\fR\fB(\fR\fBconst\ pam_handle_t\ *\fR\fB\fIpamh\fR\fR\fB, \fR\fBconst\ char\ **\fR\fB\fIuser\fR\fR\fB, \fR\fBconst\ char\ *\fR\fB\fIprompt\fR\fR\fB);\fR
+.SH "DESCRIPTION"
+.PP
+The
+\fBpam_get_user\fR
+function returns the name of the user specified by
+\fBpam_start\fR(3). If no user was specified it what
+\fBpam_get_item (pamh, PAM_USER, ... );\fR
+would have returned. If this is NULL it obtains the username via the
+\fBpam_conv\fR(3)
+mechanism, it prompts the user with the first non\-NULL string in the following list:
+.TP 3
+\(bu
+The
+\fIprompt\fR
+argument passed to the function.
+.TP
+\(bu
+What is returned by pam_get_item (pamh, PAM_USER_PROMPT, ... );
+.TP
+\(bu
+The default prompt: "login: "
+.PP
+By whatever means the username is obtained, a pointer to it is returned as the contents of
+\fI*user\fR. Note, this memory should
+\fInot\fR
+be
+\fIfree()\fR'd or
+\fImodified\fR
+by the module.
+.PP
+This function sets the
+\fIPAM_USER\fR
+item associated with the
+\fBpam_set_item\fR(3)
+and
+\fBpam_get_item\fR(3)
+functions.
+.SH "RETURN VALUES"
+.TP
+PAM_SUCCESS
+User name was successful retrieved.
+.TP
+PAM_SYSTEM_ERR
+A NULL pointer was submitted.
+.TP
+PAM_CONV_ERR
+The conversation method supplied by the application failed to obtain the username.
+.SH "SEE ALSO"
+.PP
+\fBpam_end\fR(3),
+\fBpam_get_item\fR(3),
+\fBpam_set_item\fR(3),
+\fBpam_strerror\fR(3)