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