xref: /netbsd-src/external/bsd/openpam/dist/doc/man/pam_vprompt.3 (revision d909946ca08dceb44d7d0f22ec9488679695d976)
1.\"	$NetBSD: pam_vprompt.3,v 1.6 2014/10/24 18:25:14 christos Exp $
2.\"
3.\" Generated from pam_vprompt.c by gendoc.pl
4.\" Id: pam_vprompt.c 648 2013-03-05 17:54:27Z des
5.Dd September 12, 2014
6.Dt PAM_VPROMPT 3
7.Os
8.Sh NAME
9.Nm pam_vprompt
10.Nd call the conversation function
11.Sh LIBRARY
12.Lb libpam
13.Sh SYNOPSIS
14.In sys/types.h
15.In security/pam_appl.h
16.Ft "int"
17.Fn pam_vprompt "const pam_handle_t *pamh" "int style" "char **resp" "const char *fmt" "va_list ap"
18.Sh DESCRIPTION
19The
20.Fn pam_vprompt
21function constructs a string from the
22.Fa fmt
23and
24.Fa ap
25arguments using
26.Xr vsnprintf 3 ,
27and passes it to the given PAM context's
28conversation function.
29.Pp
30The
31.Fa style
32argument specifies the type of interaction requested, and
33must be one of the following:
34.Bl -tag -width 18n
35.It Dv PAM_PROMPT_ECHO_OFF
36Display the message and obtain the user's response without
37displaying it.
38.It Dv PAM_PROMPT_ECHO_ON
39Display the message and obtain the user's response.
40.It Dv PAM_ERROR_MSG
41Display the message as an error message, and do not wait
42for a response.
43.It Dv PAM_TEXT_INFO
44Display the message as an informational message, and do
45not wait for a response.
46.El
47.Pp
48A pointer to the response, or
49.Dv NULL
50if the conversation function did
51not return one, is stored in the location pointed to by the
52.Fa resp
53argument.
54.Pp
55The message and response should not exceed
56.Dv PAM_MAX_MSG_SIZE
57or
58.Dv PAM_MAX_RESP_SIZE ,
59respectively.
60If they do, they may be truncated.
61.Sh RETURN VALUES
62The
63.Fn pam_vprompt
64function returns one of the following values:
65.Bl -tag -width 18n
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 des@des.no .
100