pam_end.3 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. '\" t
  2. .\" Title: pam_end
  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 "PAM_END" "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. pam_end \- termination of PAM transaction
  32. .SH "SYNOPSIS"
  33. .sp
  34. .ft B
  35. .nf
  36. #include <security/pam_appl\&.h>
  37. .fi
  38. .ft
  39. .HP \w'int\ pam_end('u
  40. .BI "int pam_end(pam_handle_t\ *" "pamh" ", int\ " "pam_status" ");"
  41. .SH "DESCRIPTION"
  42. .PP
  43. The
  44. \fBpam_end\fR
  45. function terminates the PAM transaction and is the last function an application should call in the PAM context\&. Upon return the handle
  46. \fIpamh\fR
  47. is no longer valid and all memory associated with it will be invalid\&.
  48. .PP
  49. The
  50. \fIpam_status\fR
  51. argument should be set to the value returned to the application by the last PAM library call\&.
  52. .PP
  53. The value taken by
  54. \fIpam_status\fR
  55. is used as an argument to the module specific callback function,
  56. \fBcleanup()\fR
  57. (See
  58. \fBpam_set_data\fR(3)
  59. and
  60. \fBpam_get_data\fR(3))\&. In this way the module can be given notification of the pass/fail nature of the tear\-down process, and perform any last minute tasks that are appropriate to the module before it is unlinked\&. This argument can be logically OR\*(Aqd with
  61. \fIPAM_DATA_SILENT\fR
  62. to indicate that the module should not treat the call too seriously\&. It is generally used to indicate that the current closing of the library is in a
  63. \fBfork\fR(2)ed process, and that the parent will take care of cleaning up things that exist outside of the current process space (files etc\&.)\&.
  64. .PP
  65. This function
  66. \fIfree\fR\*(Aqs all memory for items associated with the
  67. \fBpam_set_item\fR(3)
  68. and
  69. \fBpam_get_item\fR(3)
  70. functions\&. Pointers associated with such objects are not valid anymore after
  71. \fBpam_end\fR
  72. was called\&.
  73. .SH "RETURN VALUES"
  74. .PP
  75. PAM_SUCCESS
  76. .RS 4
  77. Transaction was successful terminated\&.
  78. .RE
  79. .PP
  80. PAM_SYSTEM_ERR
  81. .RS 4
  82. System error, for example a NULL pointer was submitted as PAM handle or the function was called by a module\&.
  83. .RE
  84. .SH "SEE ALSO"
  85. .PP
  86. \fBpam_get_data\fR(3),
  87. \fBpam_set_data\fR(3),
  88. \fBpam_start\fR(3),
  89. \fBpam_strerror\fR(3)