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"
6 <!ENTITY accessconf SYSTEM "pam_item_types_std.inc.xml">
7 <!ENTITY accessconf SYSTEM "pam_item_types_ext.inc.xml">
11 <refentry id='pam_get_item'>
14 <refentrytitle>pam_get_item</refentrytitle>
15 <manvolnum>3</manvolnum>
16 <refmiscinfo class='setdesc'>Linux-PAM Manual</refmiscinfo>
19 <refnamediv id='pam_get_item-name'>
20 <refname>pam_get_item</refname>
22 getting PAM informations
27 <!-- body begins here -->
31 <funcsynopsis id="pam_get_item-synopsis">
32 <funcsynopsisinfo>#include <security/pam_modules.h></funcsynopsisinfo>
34 <funcdef>int <function>pam_get_item</function></funcdef>
35 <paramdef>const pam_handle_t *<parameter>pamh</parameter></paramdef>
36 <paramdef>int <parameter>item_type</parameter></paramdef>
37 <paramdef>const void **<parameter>item</parameter></paramdef>
44 <refsect1 id="pam_get_item-description">
45 <title>DESCRIPTION</title>
47 The <function>pam_get_item</function> function allows applications
48 and PAM service modules to access and retrieve PAM informations
49 of <emphasis>item_type</emphasis>. Upon successful return,
50 <emphasis>item</emphasis> contains a pointer to the value of the
51 corresponding item. Note, this is a pointer to the
52 <emphasis>actual</emphasis> data and should
53 <emphasis remap="B">not</emphasis> be <emphasis>free()</emphasis>'ed or
54 over-written! The following values are supported for
55 <emphasis>item_type</emphasis>:
58 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
59 href="pam_item_types_std.inc.xml"/>
62 The following additional items are specific to Linux-PAM and should not be used in
63 portable applications:
66 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
67 href="pam_item_types_ext.inc.xml"/>
70 If a service module wishes to obtain the name of the user,
71 it should not use this function, but instead perform a call to
73 <refentrytitle>pam_get_user</refentrytitle><manvolnum>3</manvolnum>
77 Only a service module is privileged to read the
78 authentication tokens, PAM_AUTHTOK and PAM_OLDAUTHTOK.
83 <refsect1 id="pam_get_item-return_values">
84 <title>RETURN VALUES</title>
87 <term>PAM_BAD_ITEM</term>
90 The application attempted to set an undefined or inaccessible
96 <term>PAM_BUF_ERR</term>
104 <term>PAM_PERM_DENIED</term>
107 The value of <emphasis>item</emphasis> was NULL.
112 <term>PAM_SUCCESS</term>
115 Data was successful updated.
120 <term>PAM_SYSTEM_ERR</term>
123 The <emphasis>pam_handle_t</emphasis> passed as first
124 argument was invalid.
131 <refsect1 id="pam_get_item-see_also">
132 <title>SEE ALSO</title>
135 <refentrytitle>pam_set_item</refentrytitle><manvolnum>3</manvolnum>
138 <refentrytitle>pam_strerror</refentrytitle><manvolnum>3</manvolnum>