1.\" Generated from pam_vprompt.c by gendoc.pl
2.\" $OpenPAM: pam_vprompt.c 938 2017-04-30 21:34:42Z des $
3.Dd February 24, 2019
4.Dt PAM_VPROMPT 3
5.Os
6.Sh NAME
7.Nm pam_vprompt
8.Nd call the conversation function
9.Sh SYNOPSIS
10.In sys/types.h
11.In security/pam_appl.h
12.In security/openpam.h
13.Ft "int"
14.Fn pam_vprompt "const pam_handle_t *pamh" "int style" "char **resp" "const char *fmt" "va_list ap"
15.Sh DESCRIPTION
16The
17.Fn pam_vprompt
18function constructs a string from the
19.Fa fmt
20and
21.Fa ap
22arguments using
23.Xr vsnprintf 3 ,
24and passes it to the given PAM context's
25conversation function.
26.Pp
27The
28.Fa style
29argument specifies the type of interaction requested, and
30must be one of the following:
31.Bl -tag -width 18n
32.It Dv PAM_PROMPT_ECHO_OFF
33Display the message and obtain the user's response without
34displaying it.
35.It Dv PAM_PROMPT_ECHO_ON
36Display the message and obtain the user's response.
37.It Dv PAM_ERROR_MSG
38Display the message as an error message, and do not wait
39for a response.
40.It Dv PAM_TEXT_INFO
41Display the message as an informational message, and do
42not wait for a response.
43.El
44.Pp
45A pointer to the response, or
46.Dv NULL
47if the conversation function did
48not return one, is stored in the location pointed to by the
49.Fa resp
50argument.
51.Pp
52The message and response should not exceed
53.Dv PAM_MAX_MSG_SIZE
54or
55.Dv PAM_MAX_RESP_SIZE ,
56respectively.
57If they do, they may be truncated.
58.Pp
59.Sh RETURN VALUES
60The
61.Fn pam_vprompt
62function returns one of the following values:
63.Bl -tag -width 18n
64.It Bq Er PAM_SUCCESS
65Success.
66.It Bq Er PAM_BUF_ERR
67Memory buffer error.
68.It Bq Er PAM_CONV_ERR
69Conversation failure.
70.It Bq Er PAM_SYSTEM_ERR
71System error.
72.El
73.Sh SEE ALSO
74.Xr pam 3 ,
75.Xr pam_error 3 ,
76.Xr pam_info 3 ,
77.Xr pam_prompt 3 ,
78.Xr pam_strerror 3 ,
79.Xr pam_verror 3 ,
80.Xr pam_vinfo 3 ,
81.Xr vsnprintf 3
82.Sh STANDARDS
83The
84.Fn pam_vprompt
85function is an OpenPAM extension.
86.Sh AUTHORS
87The
88.Fn pam_vprompt
89function and this manual page were
90developed for the
91.Fx
92Project by ThinkSec AS and Network Associates Laboratories, the
93Security Research Division of Network Associates, Inc.\& under
94DARPA/SPAWAR contract N66001-01-C-8035
95.Pq Dq CBOSS ,
96as part of the DARPA CHATS research program.
97.Pp
98The OpenPAM library is maintained by
99.An Dag-Erling Sm\(/orgrav Aq Mt des@des.no .
100