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">
5 <refentry id='pam_get_data'>
8 <refentrytitle>pam_get_data</refentrytitle>
9 <manvolnum>3</manvolnum>
10 <refmiscinfo class='setdesc'>Linux-PAM Manual</refmiscinfo>
13 <refnamediv id='pam_get_data-name'>
14 <refname>pam_get_data</refname>
16 get module internal data
21 <!-- body begins here -->
25 <funcsynopsis id="pam_get_data-synopsis">
26 <funcsynopsisinfo>#include <security/pam_modules.h></funcsynopsisinfo>
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>
38 <refsect1 id="pam_get_data-description">
39 <title>DESCRIPTION</title>
41 This function together with the
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.
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.
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.
61 <refsect1 id="pam_get_data-return_values">
62 <title>RETURN VALUES</title>
65 <term>PAM_SUCCESS</term>
68 Data was successful retrieved.
73 <term>PAM_SYSTEM_ERR</term>
76 A NULL pointer was submitted as PAM handle or the
77 function was called by an application.
82 <term>PAM_NO_MODULE_DATA</term>
85 Module data not found or there is an entry, but it has
93 <refsect1 id="pam_get_data-see_also">
94 <title>SEE ALSO</title>
97 <refentrytitle>pam_end</refentrytitle><manvolnum>3</manvolnum>
100 <refentrytitle>pam_set_data</refentrytitle><manvolnum>3</manvolnum>
103 <refentrytitle>pam_strerror</refentrytitle><manvolnum>3</manvolnum>