Debian Codegraph @

upstream/debian-unstable/man3/misc_conv.3

raw
1 '\" t
2 .\" Title: misc_conv
3 .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
4 .\" Generator: DocBook XSL Stylesheets v1.79.2 <http://docbook.sf.net/>
5 .\" Date: 06/29/2025
6 .\" Manual: Linux-PAM Manual
7 .\" Source: Linux-PAM
8 .\" Language: English
9 .\"
10 .TH "MISC_CONV" "3" "06/29/2025" "Linux\-PAM" "Linux\-PAM Manual"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 misc_conv \- text based conversation function
32 .SH "SYNOPSIS"
33 .sp
34 .ft B
35 .nf
36 #include <security/pam_misc\&.h>
37 .fi
38 .ft
39 .HP \w'int\ misc_conv('u
40 .BI "int misc_conv(int\ " "num_msg" ", const\ struct\ pam_message\ **" "msgm" ", struct\ pam_response\ **" "response" ", void\ *" "appdata_ptr" ");"
41 .SH "DESCRIPTION"
42 .PP
43 The
44 \fBmisc_conv\fR
45 function is part of
46 \fBlibpam_misc\fR
47 and not of the standard
48 \fBlibpam\fR
49 library\&. This function will prompt the user with the appropriate comments and obtain the appropriate inputs as directed by authentication modules\&.
50 .PP
51 In addition to simply slotting into the appropriate
52 \fBpam_conv\fR(3), this function provides some time\-out facilities\&. The function exports five variables that can be used by an application programmer to limit the amount of time this conversation function will spend waiting for the user to type something\&. The five variables are as follows:
53 .PP
54 time_t pam_misc_conv_warn_time;
55 .RS 4
56 This variable contains the
57 \fItime\fR
58 (as returned by
59 \fBtime\fR(2)) that the user should be first warned that the clock is ticking\&. By default it has the value
60 0, which indicates that no such warning will be given\&. The application may set its value to sometime in the future, but this should be done prior to passing control to the
61 \fILinux\-PAM\fR
62 library\&.
63 .RE
64 .PP
65 const char *pam_misc_conv_warn_line;
66 .RS 4
67 Used in conjunction with
68 \fIpam_misc_conv_warn_time\fR, this variable is a pointer to the string that will be displayed when it becomes time to warn the user that the timeout is approaching\&. Its default value is a translated version of
69 \(lq\&.\&.\&.Time is running out\&.\&.\&.\(rq, but this can be changed by the application prior to passing control to
70 \fILinux\-PAM\fR\&.
71 .RE
72 .PP
73 time_t pam_misc_conv_die_time;
74 .RS 4
75 This variable contains the
76 \fItime\fR
77 (as returned by
78 \fBtime\fR(2)) that the will time out\&. By default it has the value
79 0, which indicates that the conversation function will not timeout\&. The application may set its value to sometime in the future, but this should be done prior to passing control to the
80 \fILinux\-PAM\fR
81 library\&.
82 .RE
83 .PP
84 const char *pam_misc_conv_die_line;
85 .RS 4
86 Used in conjunction with
87 \fIpam_misc_conv_die_time\fR, this variable is a pointer to the string that will be displayed when the conversation times out\&. Its default value is a translated version of
88 \(lq\&.\&.\&.Sorry, your time is up!\(rq, but this can be changed by the application prior to passing control to
89 \fILinux\-PAM\fR\&.
90 .RE
91 .PP
92 int pam_misc_conv_died;
93 .RS 4
94 Following a return from the
95 \fILinux\-PAM\fR
96 library, the value of this variable indicates whether the conversation has timed out\&. A value of
97 1
98 indicates the time\-out occurred\&.
99 .RE
100 .PP
101 The following two function pointers are available for supporting binary prompts in the conversation function\&. They are optimized for the current incarnation of the
102 \fBlibpamc\fR
103 library and are subject to change\&.
104 .PP
105 int (*pam_binary_handler_fn)(void *appdata, pamc_bp_t *prompt_p);
106 .RS 4
107 This function pointer is initialized to
108 NULL
109 but can be filled with a function that provides machine\-machine (hidden) message exchange\&. It is intended for use with hidden authentication protocols such as RSA or Diffie\-Hellman key exchanges\&. (This is still under development\&.)
110 .RE
111 .PP
112 int (*pam_binary_handler_free)(void *appdata, pamc_bp_t *delete_me);
113 .RS 4
114 This function pointer is initialized to
115 \fBPAM_BP_RENEW(delete_me, 0, 0)\fR, but can be redefined as desired by the application\&.
116 .RE
117 .SH "SEE ALSO"
118 .PP
119 \fBpam_conv\fR(3),
120 \fBpam\fR(7)
121 .SH "STANDARDS"
122 .PP
123 The
124 \fBmisc_conv\fR
125 function is part of the
126 \fBlibpam_misc\fR
127 Library and not defined in any standard\&.