3 .\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
5 .\" Manual: Linux\-PAM Manual
6 .\" Source: Linux\-PAM Manual
8 .TH "MISC_CONV" "3" "06/27/2006" "Linux\-PAM Manual" "Linux\-PAM Manual"
9 .\" disable hyphenation
11 .\" disable justification (adjust text to left margin only)
14 misc_conv \- text based conversation function
19 #include <security/pam_misc.h>
23 .BI "void misc_conv(int\ " "num_msg" ", const\ struct\ pam_message\ **" "msgm" ", struct\ pam_response\ **" "response" ", void\ *" "appdata_ptr" ");"
30 and not of the standard
32 library. This function will prompt the user with the appropriate comments and obtain the appropriate inputs as directed by authentication modules.
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:
37 \fBtime_t\fR \fIpam_misc_conv_warn_time\fR;
38 This variable contains the
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
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
52 \fBtime_t\fR \fIpam_misc_conv_die_time\fR;
53 This variable contains the
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
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
67 \fBint\fR \fIpam_misc_conv_died\fR;
68 Following a return from the
70 libraray, the value of this variable indicates whether the conversation has timed out. A value of
72 indicates the time\-out occurred.
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
76 library and are subject to change.
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
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.)
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.
95 function is part of the
97 Library and not defined in any standard.