pam_get_data.3.xml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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">
  4. <refentry id='pam_get_data'>
  5. <refmeta>
  6. <refentrytitle>pam_get_data</refentrytitle>
  7. <manvolnum>3</manvolnum>
  8. <refmiscinfo class='setdesc'>Linux-PAM Manual</refmiscinfo>
  9. </refmeta>
  10. <refnamediv id='pam_get_data-name'>
  11. <refname>pam_get_data</refname>
  12. <refpurpose>
  13. get module internal data
  14. </refpurpose>
  15. </refnamediv>
  16. <!-- body begins here -->
  17. <refsynopsisdiv>
  18. <funcsynopsis id="pam_get_data-synopsis">
  19. <funcsynopsisinfo>#include &lt;security/pam_modules.h&gt;</funcsynopsisinfo>
  20. <funcprototype>
  21. <funcdef>int <function>pam_get_data</function></funcdef>
  22. <paramdef>const pam_handle_t *<parameter>pamh</parameter></paramdef>
  23. <paramdef>const char *<parameter>module_data_name</parameter></paramdef>
  24. <paramdef>const void **<parameter>data</parameter></paramdef>
  25. </funcprototype>
  26. </funcsynopsis>
  27. </refsynopsisdiv>
  28. <refsect1 id="pam_get_data-description">
  29. <title>DESCRIPTION</title>
  30. <para>
  31. This function together with the
  32. <citerefentry>
  33. <refentrytitle>pam_set_data</refentrytitle><manvolnum>3</manvolnum>
  34. </citerefentry> function
  35. is useful to manage module-specific data meaningful only to
  36. the calling PAM module.
  37. </para>
  38. <para>
  39. The <function>pam_get_data</function> function looks up the
  40. object associated with the (hopefully) unique string
  41. <emphasis>module_data_name</emphasis> in the PAM context
  42. specified by the <emphasis>pamh</emphasis> argument.
  43. A successful call to
  44. <function>pam_get_data</function> will result in
  45. <emphasis>data</emphasis> pointing to the object. Note,
  46. this data is <emphasis>not</emphasis> a copy and should be
  47. treated as <emphasis>constant</emphasis> by the module.
  48. </para>
  49. </refsect1>
  50. <refsect1 id="pam_get_data-return_values">
  51. <title>RETURN VALUES</title>
  52. <variablelist>
  53. <varlistentry>
  54. <term>PAM_SUCCESS</term>
  55. <listitem>
  56. <para>
  57. Data was successful retrieved.
  58. </para>
  59. </listitem>
  60. </varlistentry>
  61. <varlistentry>
  62. <term>PAM_SYSTEM_ERR</term>
  63. <listitem>
  64. <para>
  65. A NULL pointer was submitted as PAM handle or the
  66. function was called by an application.
  67. </para>
  68. </listitem>
  69. </varlistentry>
  70. <varlistentry>
  71. <term>PAM_NO_MODULE_DATA</term>
  72. <listitem>
  73. <para>
  74. Module data not found or there is an entry, but it has
  75. the value NULL.
  76. </para>
  77. </listitem>
  78. </varlistentry>
  79. </variablelist>
  80. </refsect1>
  81. <refsect1 id="pam_get_data-see_also">
  82. <title>SEE ALSO</title>
  83. <para>
  84. <citerefentry>
  85. <refentrytitle>pam_end</refentrytitle><manvolnum>3</manvolnum>
  86. </citerefentry>,
  87. <citerefentry>
  88. <refentrytitle>pam_set_data</refentrytitle><manvolnum>3</manvolnum>
  89. </citerefentry>,
  90. <citerefentry>
  91. <refentrytitle>pam_strerror</refentrytitle><manvolnum>3</manvolnum>
  92. </citerefentry>
  93. </para>
  94. </refsect1>
  95. </refentry>