xref: /netbsd-src/external/bsd/openpam/dist/doc/man/pam_vprompt.3 (revision 0d9d0fd8a30be9a1924e715bbcf67a4a83efd262)
1.\"	$NetBSD: pam_vprompt.3,v 1.9 2023/06/30 21:46:20 christos Exp $
2.\"
3.\" Generated from pam_vprompt.c by gendoc.pl
4.Dd June 27, 2023
5.Dt PAM_VPROMPT 3
6.Os
7.Sh NAME
8.Nm pam_vprompt
9.Nd call the conversation function
10.Sh SYNOPSIS
11.In sys/types.h
12.In security/pam_appl.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.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