misc_conv.3 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. '\" t
  2. .\" Title: misc_conv
  3. .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
  4. .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
  5. .\" Date: 09/03/2021
  6. .\" Manual: Linux-PAM Manual
  7. .\" Source: Linux-PAM Manual
  8. .\" Language: English
  9. .\"
  10. .TH "MISC_CONV" "3" "09/03/2021" "Linux-PAM Manual" "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. \fBtime_t\fR \fIpam_misc_conv_warn_time\fR;
  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. \fBconst char *\fR\fIpam_misc_conv_warn_line\fR;
  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. \fBtime_t\fR \fIpam_misc_conv_die_time\fR;
  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. \fBconst char *\fR\fIpam_misc_conv_die_line\fR;
  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. \fBint\fR \fIpam_misc_conv_died\fR;
  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. \fBint\fR \fI(*pam_binary_handler_fn)\fR(\fBvoid *\fR\fIappdata\fR, \fBpamc_bp_t *\fR\fIprompt_p\fR);
  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. \fBint\fR \fI(*pam_binary_handler_free)\fR(\fBvoid *\fR\fIappdata\fR, \fBpamc_bp_t *\fR\fIdelete_me\fR);
  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(8)
  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\&.