pam_getenvlist.3 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. '\" t
  2. .\" Title: pam_getenvlist
  3. .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
  4. .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
  5. .\" Date: 09/03/2021
  6. .\" Manual: Linux-PAM Manual
  7. .\" Source: Linux-PAM Manual
  8. .\" Language: English
  9. .\"
  10. .TH "PAM_GETENVLIST" "3" "09/03/2021" "Linux-PAM Manual" "Linux-PAM Manual"
  11. .\" -----------------------------------------------------------------
  12. .\" * Define some portability stuff
  13. .\" -----------------------------------------------------------------
  14. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  15. .\" http://bugs.debian.org/507673
  16. .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
  17. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  18. .ie \n(.g .ds Aq \(aq
  19. .el .ds Aq '
  20. .\" -----------------------------------------------------------------
  21. .\" * set default formatting
  22. .\" -----------------------------------------------------------------
  23. .\" disable hyphenation
  24. .nh
  25. .\" disable justification (adjust text to left margin only)
  26. .ad l
  27. .\" -----------------------------------------------------------------
  28. .\" * MAIN CONTENT STARTS HERE *
  29. .\" -----------------------------------------------------------------
  30. .SH "NAME"
  31. pam_getenvlist \- getting the PAM environment
  32. .SH "SYNOPSIS"
  33. .sp
  34. .ft B
  35. .nf
  36. #include <security/pam_appl\&.h>
  37. .fi
  38. .ft
  39. .HP \w'char\ **pam_getenvlist('u
  40. .BI "char **pam_getenvlist(pam_handle_t\ *" "pamh" ");"
  41. .SH "DESCRIPTION"
  42. .PP
  43. The
  44. \fBpam_getenvlist\fR
  45. function returns a complete copy of the PAM environment as associated with the handle
  46. \fIpamh\fR\&. The PAM environment variables represent the contents of the regular environment variables of the authenticated user when service is granted\&.
  47. .PP
  48. The format of the memory is a malloc()\*(Aqd array of char pointers, the last element of which is set to NULL\&. Each of the non\-NULL entries in this array point to a NUL terminated and malloc()\*(Aqd char string of the form: "\fIname=value\fR"\&.
  49. .PP
  50. It should be noted that this memory will never be free()\*(Aqd by libpam\&. Once obtained by a call to
  51. \fBpam_getenvlist\fR, it is the responsibility of the calling application to free() this memory\&.
  52. .PP
  53. It is by design, and not a coincidence, that the format and contents of the returned array matches that required for the third argument of the
  54. \fBexecle\fR(3)
  55. function call\&.
  56. .SH "RETURN VALUES"
  57. .PP
  58. The
  59. \fBpam_getenvlist\fR
  60. function returns NULL on failure\&.
  61. .SH "SEE ALSO"
  62. .PP
  63. \fBpam_start\fR(3),
  64. \fBpam_getenv\fR(3),
  65. \fBpam_putenv\fR(3),
  66. \fBpam\fR(8)