1MISC_CONV(3)                   Linux-PAM Manual                   MISC_CONV(3)
2
3
4

NAME

6       misc_conv - text based conversation function
7

SYNOPSIS

9       #include <security/pam_misc.h>
10
11       int misc_conv(int num_msg, const struct pam_message **msgm,
12                     struct pam_response **response, void *appdata_ptr);
13

DESCRIPTION

15       The misc_conv function is part of libpam_misc and not of the standard
16       libpam library. This function will prompt the user with the appropriate
17       comments and obtain the appropriate inputs as directed by
18       authentication modules.
19
20       In addition to simply slotting into the appropriate pam_conv(3), this
21       function provides some time-out facilities. The function exports five
22       variables that can be used by an application programmer to limit the
23       amount of time this conversation function will spend waiting for the
24       user to type something. The five variables are as follows:
25
26       time_t pam_misc_conv_warn_time;
27           This variable contains the time (as returned by time(2)) that the
28           user should be first warned that the clock is ticking. By default
29           it has the value 0, which indicates that no such warning will be
30           given. The application may set its value to sometime in the future,
31           but this should be done prior to passing control to the Linux-PAM
32           library.
33
34       const char *pam_misc_conv_warn_line;
35           Used in conjunction with pam_misc_conv_warn_time, this variable is
36           a pointer to the string that will be displayed when it becomes time
37           to warn the user that the timeout is approaching. Its default value
38           is a translated version of “...Time is running out...”, but this
39           can be changed by the application prior to passing control to
40           Linux-PAM.
41
42       time_t pam_misc_conv_die_time;
43           This variable contains the time (as returned by time(2)) that the
44           will time out. By default it has the value 0, which indicates that
45           the conversation function will not timeout. The application may set
46           its value to sometime in the future, but this should be done prior
47           to passing control to the Linux-PAM library.
48
49       const char *pam_misc_conv_die_line;
50           Used in conjunction with pam_misc_conv_die_time, this variable is a
51           pointer to the string that will be displayed when the conversation
52           times out. Its default value is a translated version of “...Sorry,
53           your time is up!”, but this can be changed by the application prior
54           to passing control to Linux-PAM.
55
56       int pam_misc_conv_died;
57           Following a return from the Linux-PAM library, the value of this
58           variable indicates whether the conversation has timed out. A value
59           of 1 indicates the time-out occurred.
60
61       The following two function pointers are available for supporting binary
62       prompts in the conversation function. They are optimized for the
63       current incarnation of the libpamc library and are subject to change.
64
65       int (*pam_binary_handler_fn)(void *appdata, pamc_bp_t *prompt_p);
66           This function pointer is initialized to NULL but can be filled with
67           a function that provides machine-machine (hidden) message exchange.
68           It is intended for use with hidden authentication protocols such as
69           RSA or Diffie-Hellman key exchanges. (This is still under
70           development.)
71
72       int (*pam_binary_handler_free)(void *appdata, pamc_bp_t *delete_me);
73           This function pointer is initialized to PAM_BP_RENEW(delete_me, 0,
74           0), but can be redefined as desired by the application.
75

SEE ALSO

77       pam_conv(3), pam(8)
78

STANDARDS

80       The misc_conv function is part of the libpam_misc Library and not
81       defined in any standard.
82
83
84
85Linux-PAM                         05/07/2023                      MISC_CONV(3)
Impressum