]> granicus.if.org Git - linux-pam/blob - doc/man/pam_get_data.3.xml
Relevant BUGIDs:
[linux-pam] / doc / man / pam_get_data.3.xml
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
5 <refentry id='pam_get_data'>
6
7   <refmeta>
8     <refentrytitle>pam_get_data</refentrytitle>
9     <manvolnum>3</manvolnum>
10     <refmiscinfo class='setdesc'>Linux-PAM Manual</refmiscinfo>
11   </refmeta>
12
13   <refnamediv id='pam_get_data-name'>
14     <refname>pam_get_data</refname>
15     <refpurpose>
16        get module internal data
17     </refpurpose>
18   </refnamediv>
19
20
21 <!-- body begins here -->
22
23   <refsynopsisdiv>
24
25    <funcsynopsis id="pam_get_data-synopsis">
26      <funcsynopsisinfo>#include &lt;security/pam_modules.h&gt;</funcsynopsisinfo>
27      <funcprototype>
28        <funcdef>int <function>pam_get_data</function></funcdef>
29        <paramdef>const pam_handle_t *<parameter>pamh</parameter></paramdef>
30        <paramdef>const char *<parameter>module_data_name</parameter></paramdef>
31        <paramdef>const void **<parameter>data</parameter></paramdef>
32      </funcprototype>
33    </funcsynopsis>
34
35   </refsynopsisdiv>
36
37
38   <refsect1 id="pam_get_data-description">
39     <title>DESCRIPTION</title>
40     <para>
41       This function together with the
42       <citerefentry>
43         <refentrytitle>pam_set_data</refentrytitle><manvolnum>3</manvolnum>
44       </citerefentry> function
45       is useful to manage module-specific data meaningful only to
46       the calling PAM module.
47     </para>
48     <para>
49       The <function>pam_get_data</function> function looks up the
50       object associated with the (hopefully) unique string
51       <emphasis>module_data_name</emphasis> in the PAM context
52       specified by the <emphasis>pamh</emphasis> argument.
53       A successful call to
54       <function>pam_get_data</function> will result in
55       <emphasis>data</emphasis> pointing to the object. Note,
56       this data is <emphasis>not</emphasis> a copy and should be
57       treated as <emphasis>constant</emphasis> by the module.
58     </para>
59   </refsect1>
60
61   <refsect1 id="pam_get_data-return_values">
62     <title>RETURN VALUES</title>
63     <variablelist>
64       <varlistentry>
65         <term>PAM_SUCCESS</term>
66         <listitem>
67            <para>
68              Data was successful retrieved.
69           </para>
70         </listitem>
71       </varlistentry>
72       <varlistentry>
73         <term>PAM_SYSTEM_ERR</term>
74         <listitem>
75            <para>
76              A NULL pointer was submitted as PAM handle or the
77              function was called by an application.
78           </para>
79         </listitem>
80       </varlistentry>
81       <varlistentry>
82         <term>PAM_NO_MODULE_DATA</term>
83         <listitem>
84            <para>
85               Module data not found or there is an entry, but it has
86               the value NULL.
87           </para>
88         </listitem>
89       </varlistentry>
90     </variablelist>
91   </refsect1>
92
93   <refsect1 id="pam_get_data-see_also">
94     <title>SEE ALSO</title>
95     <para>
96       <citerefentry>
97         <refentrytitle>pam_end</refentrytitle><manvolnum>3</manvolnum>
98       </citerefentry>,
99       <citerefentry>
100         <refentrytitle>pam_set_data</refentrytitle><manvolnum>3</manvolnum>
101       </citerefentry>,
102       <citerefentry>
103         <refentrytitle>pam_strerror</refentrytitle><manvolnum>3</manvolnum>
104       </citerefentry>
105     </para>
106   </refsect1>
107
108 </refentry>