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.inc.xml">
10 <refentry id='pam_get_item'>
13 <refentrytitle>pam_get_item</refentrytitle>
14 <manvolnum>3</manvolnum>
15 <refmiscinfo class='setdesc'>Linux-PAM Manual</refmiscinfo>
18 <refnamediv id='pam_get_item-name'>
19 <refname>pam_get_item</refname>
21 getting PAM informations
26 <!-- body begins here -->
30 <funcsynopsis id="pam_get_item-synopsis">
31 <funcsynopsisinfo>#include <security/pam_modules.h></funcsynopsisinfo>
33 <funcdef>int <function>pam_get_item</function></funcdef>
34 <paramdef>const pam_handle_t *<parameter>pamh</parameter></paramdef>
35 <paramdef>int <parameter>item_type</parameter></paramdef>
36 <paramdef>const void **<parameter>item</parameter></paramdef>
43 <refsect1 id="pam_get_item-description">
44 <title>DESCRIPTION</title>
46 The <function>pam_get_item</function> function allows applications
47 and PAM service modules to access and retrieve PAM informations
48 of <emphasis>item_type</emphasis>. Upon successful return,
49 <emphasis>item</emphasis> contains a pointer to the value of the
50 corresponding item. Note, this is a pointer to the
51 <emphasis>actual</emphasis> data and should
52 <emphasis remap="B">not</emphasis> be <emphasis>free()</emphasis>'ed or
53 over-written! The following values are supported for
54 <emphasis>item_type</emphasis>:
57 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
58 href="pam_item_types.inc.xml"/>
61 If a service module wishes to obtain the name of the user,
62 it should not use this function, but instead perform a call to
64 <refentrytitle>pam_get_user</refentrytitle><manvolnum>3</manvolnum>
68 Only a service module is privileged to read the
69 authentication tokens, PAM_AUTHTOK and PAM_OLDAUTHTOK.
74 <refsect1 id="pam_get_item-return_values">
75 <title>RETURN VALUES</title>
78 <term>PAM_BAD_ITEM</term>
81 The application attempted to set an undefined or inaccessible
87 <term>PAM_BUF_ERR</term>
95 <term>PAM_PERM_DENIED</term>
98 The value of <emphasis>item</emphasis> was NULL.
103 <term>PAM_SUCCESS</term>
106 Data was successful updated.
111 <term>PAM_SYSTEM_ERR</term>
114 The <emphasis>pam_handle_t</emphasis> passed as first
115 argument was invalid.
122 <refsect1 id="pam_get_item-see_also">
123 <title>SEE ALSO</title>
126 <refentrytitle>pam_set_item</refentrytitle><manvolnum>3</manvolnum>
129 <refentrytitle>pam_strerror</refentrytitle><manvolnum>3</manvolnum>