pam_end.3.xml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
  4. <refentry id='pam_end'>
  5. <refmeta>
  6. <refentrytitle>pam_end</refentrytitle>
  7. <manvolnum>3</manvolnum>
  8. <refmiscinfo class='setdesc'>Linux-PAM Manual</refmiscinfo>
  9. </refmeta>
  10. <refnamediv id="pam_end-name">
  11. <refname>pam_end</refname>
  12. <refpurpose>termination of PAM transaction</refpurpose>
  13. </refnamediv>
  14. <!-- body begins here -->
  15. <refsynopsisdiv>
  16. <funcsynopsis id="pam_end-synopsis">
  17. <funcsynopsisinfo>#include &lt;security/pam_appl.h&gt;</funcsynopsisinfo>
  18. <funcprototype>
  19. <funcdef>int <function>pam_end</function></funcdef>
  20. <paramdef>pam_handle_t *<parameter>pamh</parameter></paramdef>
  21. <paramdef>int <parameter>pam_status</parameter></paramdef>
  22. </funcprototype>
  23. </funcsynopsis>
  24. </refsynopsisdiv>
  25. <refsect1 id="pam_end-description">
  26. <title>DESCRIPTION</title>
  27. <para>
  28. The <function>pam_end</function> function terminates the PAM
  29. transaction and is the last function an application should call
  30. in the PAM context. Upon return the handle <emphasis>pamh</emphasis>
  31. is no longer valid and all memory associated with it will be
  32. invalid.
  33. </para>
  34. <para>
  35. The <emphasis>pam_status</emphasis> argument should be set to
  36. the value returned to the application by the last PAM
  37. library call.
  38. </para>
  39. <para>
  40. The value taken by <emphasis>pam_status</emphasis> is used as
  41. an argument to the module specific callback function,
  42. <function>cleanup()</function>
  43. (See <citerefentry>
  44. <refentrytitle>pam_set_data</refentrytitle><manvolnum>3</manvolnum>
  45. </citerefentry> and
  46. <citerefentry>
  47. <refentrytitle>pam_get_data</refentrytitle><manvolnum>3</manvolnum>
  48. </citerefentry>). In this way the module can be given notification
  49. of the pass/fail nature of the tear-down process, and perform any
  50. last minute tasks that are appropriate to the module before it is
  51. unlinked. This argument can be logically OR'd with
  52. <emphasis>PAM_DATA_SILENT</emphasis> to indicate that
  53. the module should not treat the call too seriously. It is generally
  54. used to indicate that the current closing of the library is in a
  55. <citerefentry>
  56. <refentrytitle>fork</refentrytitle><manvolnum>2</manvolnum>
  57. </citerefentry>ed
  58. process, and that the parent will take care of cleaning up things
  59. that exist outside of the current process space (files etc.).
  60. </para>
  61. <para>
  62. This function <emphasis>free</emphasis>'s all memory for items
  63. associated with the
  64. <citerefentry>
  65. <refentrytitle>pam_set_item</refentrytitle><manvolnum>3</manvolnum>
  66. </citerefentry> and
  67. <citerefentry>
  68. <refentrytitle>pam_get_item</refentrytitle><manvolnum>3</manvolnum>
  69. </citerefentry> functions. Pointers associated with such objects
  70. are not valid anymore after <function>pam_end</function> was called.
  71. </para>
  72. </refsect1>
  73. <refsect1 id="pam_end-return_values">
  74. <title>RETURN VALUES</title>
  75. <variablelist>
  76. <varlistentry>
  77. <term>PAM_SUCCESS</term>
  78. <listitem>
  79. <para>
  80. Transaction was successful terminated.
  81. </para>
  82. </listitem>
  83. </varlistentry>
  84. <varlistentry>
  85. <term>PAM_SYSTEM_ERR</term>
  86. <listitem>
  87. <para>
  88. System error, for example a NULL pointer was submitted
  89. as PAM handle or the function was called by a module.
  90. </para>
  91. </listitem>
  92. </varlistentry>
  93. </variablelist>
  94. </refsect1>
  95. <refsect1 id="pam_end-see_also">
  96. <title>SEE ALSO</title>
  97. <para>
  98. <citerefentry>
  99. <refentrytitle>pam_get_data</refentrytitle><manvolnum>3</manvolnum>
  100. </citerefentry>,
  101. <citerefentry>
  102. <refentrytitle>pam_set_data</refentrytitle><manvolnum>3</manvolnum>
  103. </citerefentry>,
  104. <citerefentry>
  105. <refentrytitle>pam_start</refentrytitle><manvolnum>3</manvolnum>
  106. </citerefentry>,
  107. <citerefentry>
  108. <refentrytitle>pam_strerror</refentrytitle><manvolnum>3</manvolnum>
  109. </citerefentry>
  110. </para>
  111. </refsect1>
  112. </refentry>