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