]> granicus.if.org Git - linux-pam/blob - doc/man/pam_start.3.xml
Relevant BUGIDs:
[linux-pam] / doc / man / pam_start.3.xml
1 <?xml version="1.0" encoding="ISO-8859-1"?>
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_start'>
6
7   <refmeta>
8     <refentrytitle>pam_start</refentrytitle>
9     <manvolnum>3</manvolnum>
10     <refmiscinfo class='setdesc'>Linux-PAM Manual</refmiscinfo>
11   </refmeta>
12
13   <refnamediv id="pam_start-name">
14     <refname>pam_start</refname>
15     <refpurpose>initialization of PAM transaction</refpurpose>
16   </refnamediv>
17
18 <!-- body begins here -->
19
20   <refsynopsisdiv id="pam_start-synopsis">
21     <funcsynopsis>
22       <funcsynopsisinfo>#include &lt;security/pam_appl.h&gt;</funcsynopsisinfo>
23       <funcprototype>
24         <funcdef>int <function>pam_start</function></funcdef>
25         <paramdef>const char *<parameter>service_name</parameter></paramdef>
26         <paramdef>const char *<parameter>user</parameter></paramdef>
27         <paramdef>const struct pam_conv *<parameter>pam_conversation</parameter></paramdef>
28         <paramdef>pam_handle_t **<parameter>pamh</parameter></paramdef>
29       </funcprototype>
30     </funcsynopsis>
31   </refsynopsisdiv>
32
33
34   <refsect1 id="pam_start-description">
35     <title>DESCRIPTION</title>
36     <para>
37       The <function>pam_start</function> function creates the PAM context
38       and initiates the PAM transaction. It is the first of the PAM
39       functions that needs to be called by an application.
40     </para>
41
42     <para>
43       The <emphasis>service_name</emphasis> argument specifies the name
44       of the service to apply and will be stored as PAM_SERVICE item in
45       the new context. The policy for the service will be read from the
46       file <filename>/etc/pam.d/service_name</filename> or, if that file
47       does not exist, from <filename>/etc/pam.conf</filename>.
48     </para>
49
50     <para>
51        The <emphasis>user</emphasis> argument can specify the name
52        of the target user and will be stored as PAM_USER item. If
53        the argument is NULL, the module has to ask for this item if
54        necessary.
55     </para>
56
57     <para>
58        The <emphasis>pam_conversation</emphasis> argument points to
59        a <emphasis>struct pam_conv</emphasis> describing the
60        conversation function to use. An application must provide this
61        for direct communication between a loaded module and the
62        application.
63     </para>
64
65     <para>
66        Following a successful return (PAM_SUCCESS) the contents of
67        <emphasis>pamh</emphasis> is a handle that contains the PAM
68        context for successive calls to the PAM functions. In an error
69        case is the content of <emphasis>pamh</emphasis> undefined.
70     </para>
71
72     <para>
73       The <emphasis>pam_handle_t</emphasis> is a blind structure and
74       the application should not attempt to probe it directly for
75       information. Instead the PAM library provides the functions
76       <citerefentry>
77         <refentrytitle>pam_set_item</refentrytitle><manvolnum>3</manvolnum>
78       </citerefentry> and
79       <citerefentry>
80         <refentrytitle>pam_get_item</refentrytitle><manvolnum>3</manvolnum>
81       </citerefentry>.
82       The PAM handle cannot be used for mulitiple authentications at the
83       same time as long as <function>pam_end</function> was not called on
84       it before.
85     </para>
86   </refsect1>
87   <refsect1 id="pam_start-return_values">
88     <title>RETURN VALUES</title>
89     <variablelist>
90       <varlistentry>
91         <term>PAM_ABORT</term>
92         <listitem>
93            <para>
94               General failure.
95           </para>
96         </listitem>
97       </varlistentry>
98       <varlistentry>
99         <term>PAM_BUF_ERR</term>
100         <listitem>
101            <para>
102               Memory buffer error.
103           </para>
104         </listitem>
105       </varlistentry>
106       <varlistentry>
107         <term>PAM_SUCCESS</term>
108         <listitem>
109            <para>
110              Transaction was successful created.
111           </para>
112         </listitem>
113       </varlistentry>
114       <varlistentry>
115         <term>PAM_SYSTEM_ERR</term>
116         <listitem>
117            <para>
118               System error, for example a NULL pointer was submitted
119               instead of a pointer to data.
120           </para>
121         </listitem>
122       </varlistentry>
123     </variablelist>
124   </refsect1>
125
126   <refsect1 id="pam_start-see_also">
127     <title>SEE ALSO</title>
128     <para>
129       <citerefentry>
130         <refentrytitle>pam_get_data</refentrytitle><manvolnum>3</manvolnum>
131       </citerefentry>,
132       <citerefentry>
133         <refentrytitle>pam_set_data</refentrytitle><manvolnum>3</manvolnum>
134       </citerefentry>,
135       <citerefentry>
136         <refentrytitle>pam_end</refentrytitle><manvolnum>3</manvolnum>
137       </citerefentry>,
138       <citerefentry>
139         <refentrytitle>pam_strerror</refentrytitle><manvolnum>3</manvolnum>
140       </citerefentry>
141     </para>
142   </refsect1>
143 </refentry>