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 <refentry id='pam_getenvlist'>
6 <refentrytitle>pam_getenvlist</refentrytitle>
7 <manvolnum>3</manvolnum>
8 <refmiscinfo class='setdesc'>Linux-PAM Manual</refmiscinfo>
11 <refnamediv id="pam_getenvlist-name">
12 <refname>pam_getenvlist</refname>
13 <refpurpose>getting the PAM environment</refpurpose>
16 <!-- body begins here -->
18 <refsynopsisdiv id='pam_getenvlist-synopsis'>
20 <funcsynopsisinfo>#include <security/pam_appl.h></funcsynopsisinfo>
22 <funcdef>char **<function>pam_getenvlist</function></funcdef>
23 <paramdef>pam_handle_t *<parameter>pamh</parameter></paramdef>
29 <refsect1 id='pam_getenvlist-description'>
30 <title>DESCRIPTION</title>
32 The <function>pam_getenvlist</function> function returns a complete
33 copy of the PAM environment as associated with the handle
34 <emphasis>pamh</emphasis>. The PAM environment variables
35 represent the contents of the regular environment variables of the
36 authenticated user when service is granted.
39 The format of the memory is a malloc()'d array of char pointers,
40 the last element of which is set to NULL. Each of the non-NULL
41 entries in this array point to a NUL terminated and malloc()'d
42 char string of the form: "<emphasis>name=value</emphasis>".
45 It should be noted that this memory will never be free()'d by
46 libpam. Once obtained by a call to
47 <function>pam_getenvlist</function>, it is the responsibility of
48 the calling application to free() this memory.
51 It is by design, and not a coincidence, that the format and contents
52 of the returned array matches that required for the third argument of
55 <refentrytitle>execle</refentrytitle><manvolnum>3</manvolnum>
56 </citerefentry> function call.
60 <refsect1 id="pam_getenvlist-return_values">
61 <title>RETURN VALUES</title>
63 The <function>pam_getenvlist</function> function returns NULL
68 <refsect1 id='pam_getenvlist-see_also'>
69 <title>SEE ALSO</title>
72 <refentrytitle>pam_start</refentrytitle><manvolnum>3</manvolnum>
75 <refentrytitle>pam_getenv</refentrytitle><manvolnum>3</manvolnum>
78 <refentrytitle>pam_putenv</refentrytitle><manvolnum>3</manvolnum>
81 <refentrytitle>pam</refentrytitle><manvolnum>8</manvolnum>