]> granicus.if.org Git - linux-pam/blob - doc/man/misc_conv.3
Relevant BUGIDs:
[linux-pam] / doc / man / misc_conv.3
1 .\"     Title: misc_conv
2 .\"    Author: 
3 .\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
4 .\"      Date: 06/27/2006
5 .\"    Manual: Linux\-PAM Manual
6 .\"    Source: Linux\-PAM Manual
7 .\"
8 .TH "MISC_CONV" "3" "06/27/2006" "Linux\-PAM Manual" "Linux\-PAM Manual"
9 .\" disable hyphenation
10 .nh
11 .\" disable justification (adjust text to left margin only)
12 .ad l
13 .SH "NAME"
14 misc_conv \- text based conversation function
15 .SH "SYNOPSIS"
16 .sp
17 .ft B
18 .nf
19 #include <security/pam_misc.h>
20 .fi
21 .ft
22 .HP 15
23 .BI "void misc_conv(int\ " "num_msg" ", const\ struct\ pam_message\ **" "msgm" ", struct\ pam_response\ **" "response" ", void\ *" "appdata_ptr" ");"
24 .SH "DESCRIPTION"
25 .PP
26 The
27 \fBmisc_conv\fR
28 function is part of
29 \fBlibpam_misc\fR
30 and not of the standard
31 \fBlibpam\fR
32 library. This function will prompt the user with the appropriate comments and obtain the appropriate inputs as directed by authentication modules.
33 .PP
34 In addition to simply slotting into the appropriate
35 \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 variabls are as follows:
36 .TP 3n
37 \fBtime_t\fR \fIpam_misc_conv_warn_time\fR;
38 This variable contains the
39 \fItime\fR
40 (as returned by
41 \fBtime\fR(2)) that the user should be first warned that the clock is ticking. By default it has the value
42 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
43 \fILinux\-PAM\fR
44 library.
45 .TP 3n
46 \fBconst char *\fR\fIpam_misc_conv_warn_line\fR;
47 Used in conjuction with
48 \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
49 \(lq...Time is running out...\(rq, but this can be changed by the application prior to passing control to
50 \fILinux\-PAM\fR.
51 .TP 3n
52 \fBtime_t\fR \fIpam_misc_conv_die_time\fR;
53 This variable contains the
54 \fItime\fR
55 (as returned by
56 \fBtime\fR(2)) that the will time out. By default it has the value
57 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
58 \fILinux\-PAM\fR
59 library.
60 .TP 3n
61 \fBconst char *\fR\fIpam_misc_conv_die_line\fR;
62 Used in conjuction with
63 \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
64 \(lq...Sorry, your time is up!\(rq, but this can be changed by the application prior to passing control to
65 \fILinux\-PAM\fR.
66 .TP 3n
67 \fBint\fR \fIpam_misc_conv_died\fR;
68 Following a return from the
69 \fILinux\-PAM\fR
70 libraray, the value of this variable indicates whether the conversation has timed out. A value of
71 1
72 indicates the time\-out occurred.
73 .PP
74 The following two function pointers are available for supporting binary prompts in the conversation function. They are optimized for the current incarnation of the
75 \fBlibpamc\fR
76 library and are subject to change.
77 .TP 3n
78 \fBint\fR \fI(*pam_binary_handler_fn)\fR(\fBvoid *\fR\fIappdata\fR, \fBpamc_bp_t *\fR\fIprompt_p\fR);
79 This function pointer is initialized to
80 NULL
81 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.)
82 .TP 3n
83 \fBint\fR \fI(*pam_binary_handler_free)\fR(\fBvoid *\fR\fIappdata\fR, \fBpamc_bp_t *\fR\fIdelete_me\fR);
84 This function pointer is initialized to
85 \fBPAM_BP_RENEW(delete_me, 0, 0)\fR, but can be redefined as desired by the application.
86 .SH "SEE ALSO"
87 .PP
88
89 \fBpam_conv\fR(3),
90 \fBpam\fR(8)
91 .SH "STANDARDS"
92 .PP
93 The
94 \fBmisc_conv\fR
95 function is part of the
96 \fBlibpam_misc\fR
97 Library and not defined in any standard.