pam_keyinit.8.xml 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. <?xml version="1.0" encoding='UTF-8'?>
  2. <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
  4. <refentry id="pam_keyinit">
  5. <refmeta>
  6. <refentrytitle>pam_keyinit</refentrytitle>
  7. <manvolnum>8</manvolnum>
  8. <refmiscinfo class="sectdesc">Linux-PAM Manual</refmiscinfo>
  9. </refmeta>
  10. <refnamediv id="pam_keyinit-name">
  11. <refname>pam_keyinit</refname>
  12. <refpurpose>Kernel session keyring initialiser module</refpurpose>
  13. </refnamediv>
  14. <refsynopsisdiv>
  15. <cmdsynopsis id="pam_keyinit-cmdsynopsis">
  16. <command>pam_keyinit.so</command>
  17. <arg choice="opt">
  18. debug
  19. </arg>
  20. <arg choice="opt">
  21. force
  22. </arg>
  23. <arg choice="opt">
  24. revoke
  25. </arg>
  26. </cmdsynopsis>
  27. </refsynopsisdiv>
  28. <refsect1 id="pam_keyinit-description">
  29. <title>DESCRIPTION</title>
  30. <para>
  31. The pam_keyinit PAM module ensures that the invoking process has a
  32. session keyring other than the user default session keyring.
  33. </para>
  34. <para>
  35. The module checks to see if the process's session keyring is the
  36. <citerefentry>
  37. <refentrytitle>user-session-keyring</refentrytitle><manvolnum>7</manvolnum>
  38. </citerefentry>,
  39. and, if it is, creates a new
  40. <citerefentry>
  41. <refentrytitle>session-keyring</refentrytitle><manvolnum>7</manvolnum>
  42. </citerefentry>
  43. with which to replace it. If a new session keyring is created, it will
  44. install a link to the
  45. <citerefentry>
  46. <refentrytitle>user-keyring</refentrytitle><manvolnum>7</manvolnum>
  47. </citerefentry>
  48. in the session keyring so that keys common to the user will be
  49. automatically accessible through it. The session keyring of the invoking
  50. process will thenceforth be inherited by all its children unless they override it.
  51. </para>
  52. <para>
  53. In order to allow other PAM modules to attach tokens to the keyring, this module
  54. provides both an <emphasis>auth</emphasis> (limited to
  55. <citerefentry>
  56. <refentrytitle>pam_setcred</refentrytitle><manvolnum>3</manvolnum>
  57. </citerefentry>
  58. and a <emphasis>session</emphasis> component. The session keyring is created
  59. in the module called. Moreover this module should be included as early as
  60. possible in a PAM configuration.
  61. </para>
  62. <para>
  63. This module is intended primarily for use by login processes. Be aware
  64. that after the session keyring has been replaced, the old session keyring
  65. and the keys it contains will no longer be accessible.
  66. </para>
  67. <para>
  68. This module should not, generally, be invoked by programs like
  69. <emphasis remap='B'>su</emphasis>, since it is usually desirable for the
  70. key set to percolate through to the alternate context. The keys have
  71. their own permissions system to manage this.
  72. </para>
  73. <para>
  74. The keyutils package is used to manipulate keys more directly. This
  75. can be obtained from:
  76. </para>
  77. <para>
  78. <ulink url="http://people.redhat.com/~dhowells/keyutils/">
  79. Keyutils
  80. </ulink>
  81. </para>
  82. </refsect1>
  83. <refsect1 id="pam_keyinit-options">
  84. <title>OPTIONS</title>
  85. <variablelist>
  86. <varlistentry>
  87. <term>
  88. <option>debug</option>
  89. </term>
  90. <listitem>
  91. <para>
  92. Log debug information with <citerefentry>
  93. <refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum>
  94. </citerefentry>.
  95. </para>
  96. </listitem>
  97. </varlistentry>
  98. <varlistentry>
  99. <term>
  100. <option>force</option>
  101. </term>
  102. <listitem>
  103. <para>
  104. Causes the session keyring of the invoking process to be replaced
  105. unconditionally.
  106. </para>
  107. </listitem>
  108. </varlistentry>
  109. <varlistentry>
  110. <term>
  111. <option>revoke</option>
  112. </term>
  113. <listitem>
  114. <para>
  115. Causes the session keyring of the invoking process to be revoked
  116. when the invoking process exits if the session keyring was created
  117. for this process in the first place.
  118. </para>
  119. </listitem>
  120. </varlistentry>
  121. </variablelist>
  122. </refsect1>
  123. <refsect1 id="pam_keyinit-types">
  124. <title>MODULE TYPES PROVIDED</title>
  125. <para>
  126. Only the <option>session</option> module type is provided.
  127. </para>
  128. </refsect1>
  129. <refsect1 id='pam_keyinit-return_values'>
  130. <title>RETURN VALUES</title>
  131. <variablelist>
  132. <varlistentry>
  133. <term>PAM_SUCCESS</term>
  134. <listitem>
  135. <para>
  136. This module will usually return this value
  137. </para>
  138. </listitem>
  139. </varlistentry>
  140. <varlistentry>
  141. <term>PAM_AUTH_ERR</term>
  142. <listitem>
  143. <para>
  144. Authentication failure.
  145. </para>
  146. </listitem>
  147. </varlistentry>
  148. <varlistentry>
  149. <term>PAM_BUF_ERR</term>
  150. <listitem>
  151. <para>
  152. Memory buffer error.
  153. </para>
  154. </listitem>
  155. </varlistentry>
  156. <varlistentry>
  157. <term>PAM_IGNORE</term>
  158. <listitem>
  159. <para>
  160. The return value should be ignored by PAM dispatch.
  161. </para>
  162. </listitem>
  163. </varlistentry>
  164. <varlistentry>
  165. <term>PAM_SERVICE_ERR</term>
  166. <listitem>
  167. <para>
  168. Cannot determine the user name.
  169. </para>
  170. </listitem>
  171. </varlistentry>
  172. <varlistentry>
  173. <term>PAM_SESSION_ERR</term>
  174. <listitem>
  175. <para>
  176. This module will return this value if its arguments are invalid or
  177. if a system error such as ENOMEM occurs.
  178. </para>
  179. </listitem>
  180. </varlistentry>
  181. <varlistentry>
  182. <term>PAM_USER_UNKNOWN</term>
  183. <listitem>
  184. <para>
  185. User not known.
  186. </para>
  187. </listitem>
  188. </varlistentry>
  189. </variablelist>
  190. </refsect1>
  191. <refsect1 id='pam_keyinit-examples'>
  192. <title>EXAMPLES</title>
  193. <para>
  194. Add this line to your login entries to start each login session with its
  195. own session keyring:
  196. <programlisting>
  197. session required pam_keyinit.so
  198. </programlisting>
  199. </para>
  200. <para>
  201. This will prevent keys from one session leaking into another session for
  202. the same user.
  203. </para>
  204. </refsect1>
  205. <refsect1 id='pam_keyinit-see_also'>
  206. <title>SEE ALSO</title>
  207. <para>
  208. <citerefentry>
  209. <refentrytitle>pam.conf</refentrytitle><manvolnum>5</manvolnum>
  210. </citerefentry>,
  211. <citerefentry>
  212. <refentrytitle>pam.d</refentrytitle><manvolnum>5</manvolnum>
  213. </citerefentry>,
  214. <citerefentry>
  215. <refentrytitle>pam</refentrytitle><manvolnum>8</manvolnum>
  216. </citerefentry>,
  217. <citerefentry>
  218. <refentrytitle>keyctl</refentrytitle><manvolnum>1</manvolnum>
  219. </citerefentry>
  220. </para>
  221. </refsect1>
  222. <refsect1 id='pam_keyinit-author'>
  223. <title>AUTHOR</title>
  224. <para>
  225. pam_keyinit was written by David Howells, &lt;dhowells@redhat.com&gt;.
  226. </para>
  227. </refsect1>
  228. </refentry>