1 <?xml version="1.0" encoding="ISO-8859-1"?>
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">
5 <refentry id='pam_end'>
8 <refentrytitle>pam_end</refentrytitle>
9 <manvolnum>3</manvolnum>
10 <refmiscinfo class='setdesc'>Linux-PAM Manual</refmiscinfo>
13 <refnamediv id="pam_end-name">
14 <refname>pam_end</refname>
15 <refpurpose>termination of PAM transaction</refpurpose>
18 <!-- body begins here -->
20 <refsynopsisdiv id="pam_end-synopsis">
22 <funcsynopsisinfo>#include <security/pam_appl.h></funcsynopsisinfo>
24 <funcdef>int <function>pam_end</function></funcdef>
25 <paramdef>pam_handle_t *<parameter>pamh</parameter></paramdef>
26 <paramdef>int <parameter>pam_status</parameter></paramdef>
32 <refsect1 id="pam_end-description">
33 <title>DESCRIPTION</title>
35 The <function>pam_end</function> function terminates the PAM
36 transaction and is the last function an application should call
37 in the PAM contenxt. Upon return the handle <emphasis>pamh</emphasis>
38 is no longer valid and all memory associated with it will be
42 The <emphasis>pam_status</emphasis> argument should be set to
43 the value returned to the application by the last PAM
47 The value taken by <emphasis>pam_status</emphasis> is used as
48 an argument to the module specific callback function,
49 <function>cleanup()</function>
51 <refentrytitle>pam_set_data</refentrytitle><manvolnum>3</manvolnum>
54 <refentrytitle>pam_get_data</refentrytitle><manvolnum>3</manvolnum>
55 </citerefentry>). In this way the module can be given notification
56 of the pass/fail nature of the tear-down process, and perform any
57 last minute tasks that are appropriate to the module before it is
58 unlinked. This argument can be logically OR'd with
59 <emphasis>PAM_DATA_SILENT</emphasis> to indicate to indicate that
60 the module should not treat the call too seriously. It is generally
61 used to indicate that the current closing of the library is in a
63 <refentrytitle>fork</refentrytitle><manvolnum>2</manvolnum>
65 process, and that the parent will take care of cleaning up things
66 that exist outside of the current process space (files etc.).
70 This function <emphasis>free</emphasis>'s all memory for items
73 <refentrytitle>pam_set_item</refentrytitle><manvolnum>3</manvolnum>
76 <refentrytitle>pam_get_item</refentrytitle><manvolnum>3</manvolnum>
77 </citerefentry> functions. Pointers associated with such objects
78 are not valid anymore after <function>pam_end</function> was called.
82 <refsect1 id="pam_end-return_values">
83 <title>RETURN VALUES</title>
86 <term>PAM_SUCCESS</term>
89 Transaction was successful terminated.
94 <term>PAM_SYSTEM_ERR</term>
97 System error, for example a NULL pointer was submitted
98 as PAM handle or the function was called by a module.
105 <refsect1 id="pam_end-see_also">
106 <title>SEE ALSO</title>
109 <refentrytitle>pam_get_data</refentrytitle><manvolnum>3</manvolnum>
112 <refentrytitle>pam_set_data</refentrytitle><manvolnum>3</manvolnum>
115 <refentrytitle>pam_start</refentrytitle><manvolnum>3</manvolnum>
118 <refentrytitle>pam_strerror</refentrytitle><manvolnum>3</manvolnum>