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_set_item'>
13 <refentrytitle>pam_set_item</refentrytitle>
14 <manvolnum>3</manvolnum>
15 <refmiscinfo class='setdesc'>Linux-PAM Manual</refmiscinfo>
18 <refnamediv id='pam_set_item-name'>
19 <refname>pam_set_item</refname>
21 set and update PAM informations
26 <!-- body begins here -->
30 <funcsynopsis id="pam_set_item-synopsis">
31 <funcsynopsisinfo>#include <security/pam_modules.h></funcsynopsisinfo>
33 <funcdef>int <function>pam_set_item</function></funcdef>
34 <paramdef>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_set_item-description">
44 <title>DESCRIPTION</title>
46 The <function>pam_set_item</function> function allows applications
47 and PAM service modules to access and to update PAM informations
48 of <emphasis>item_type</emphasis>. For this a copy
49 of the object pointed to by the <emphasis>item</emphasis> argument
50 is created. The following <emphasis>item_type</emphasis>s are
54 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
55 href="pam_item_types.inc.xml"/>
58 For all <emphasis>item_type</emphasis>s, other than PAM_CONV and
59 PAM_FAIL_DELAY, <emphasis>item</emphasis> is a pointer to a <NUL>
60 terminated character string. In the case of PAM_CONV,
61 <emphasis>item</emphasis> points to an initialized
62 <emphasis>pam_conv</emphasis> structure. In the case of
63 PAM_FAIL_DELAY, <emphasis>item</emphasis> is a function pointer:
64 <function>void (*delay_fn)(int retval, unsigned usec_delay, void *appdata_ptr)</function>
68 Both, PAM_AUTHTOK and PAM_OLDAUTHTOK, will be reseted before
69 returning to the application. Which means an application is not
70 able to access the authentication tokens.
75 <refsect1 id="pam_set_item-return_values">
76 <title>RETURN VALUES</title>
79 <term>PAM_BAD_ITEM</term>
82 The application attempted to set an undefined or inaccessible
88 <term>PAM_BUF_ERR</term>
96 <term>PAM_SUCCESS</term>
99 Data was successful updated.
104 <term>PAM_SYSTEM_ERR</term>
107 The <emphasis>pam_handle_t</emphasis> passed as first
108 argument was invalid.
115 <refsect1 id="pam_set_item-see_also">
116 <title>SEE ALSO</title>
119 <refentrytitle>pam_get_item</refentrytitle><manvolnum>3</manvolnum>
122 <refentrytitle>pam_strerror</refentrytitle><manvolnum>3</manvolnum>