]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/openpam/doc/man/pam_getenvlist.3
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / openpam / doc / man / pam_getenvlist.3
1 .\" Generated from pam_getenvlist.c by gendoc.pl
2 .\" $Id: pam_getenvlist.c 648 2013-03-05 17:54:27Z des $
3 .Dd September 7, 2013
4 .Dt PAM_GETENVLIST 3
5 .Os
6 .Sh NAME
7 .Nm pam_getenvlist
8 .Nd returns a list of all the PAM environment variables
9 .Sh LIBRARY
10 .Lb libpam
11 .Sh SYNOPSIS
12 .In sys/types.h
13 .In security/pam_appl.h
14 .Ft "char **"
15 .Fn pam_getenvlist "pam_handle_t *pamh"
16 .Sh DESCRIPTION
17 The
18 .Fn pam_getenvlist
19 function returns a copy of the given PAM context's
20 environment list as a pointer to an array of strings.
21 The last element in the array is
22 .Dv NULL .
23 The pointer is suitable for assignment to
24 .Va environ .
25 .Pp
26 The array and the strings it lists are allocated using
27 .Xr malloc 3 ,
28 and
29 should be released using
30 .Xr free 3
31 after use:
32 .Pp
33 .Bd -literal
34     char **envlist, **env;
35
36     envlist = environ;
37     environ = pam_getenvlist(pamh);
38     /* do something nifty */
39     for (env = environ; *env != NULL; env++)
40         free(*env);
41     free(environ);
42     environ = envlist;
43 .Ed
44 .Sh RETURN VALUES
45 The
46 .Fn pam_getenvlist
47 function returns
48 .Dv NULL
49 on failure.
50 .Sh SEE ALSO
51 .Xr free 3 ,
52 .Xr malloc 3 ,
53 .Xr pam 3 ,
54 .Xr pam_getenv 3 ,
55 .Xr pam_putenv 3 ,
56 .Xr pam_setenv 3 ,
57 .Xr environ 7
58 .Sh STANDARDS
59 .Rs
60 .%T "X/Open Single Sign-On Service (XSSO) - Pluggable Authentication Modules"
61 .%D "June 1997"
62 .Re
63 .Sh AUTHORS
64 The
65 .Fn pam_getenvlist
66 function and this manual page were
67 developed for the
68 .Fx
69 Project by ThinkSec AS and Network Associates Laboratories, the
70 Security Research Division of Network Associates, Inc.\& under
71 DARPA/SPAWAR contract N66001-01-C-8035
72 .Pq Dq CBOSS ,
73 as part of the DARPA CHATS research program.
74 .Pp
75 The OpenPAM library is maintained by
76 .An Dag-Erling Sm\(/orgrav Aq des@des.no .