'\" t .\" Title: pam_set_items .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: 2015-11-04 .\" Manual: \ \& .\" Source: \ \& .\" Language: English .\" .TH "PAM_SET_ITEMS" "8" "2015\-11\-04" "\ \&" "\ \&" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" pam_set_items \- A PAM test module to set module\-specific PAM items .SH "SYNOPSIS" .sp pam_set_items\&.so .SH "DESCRIPTION" .sp PAM modules store data in PAM \fIitems\fR\&. These items are only accessible from module context, not application context as they might include private data (PAM_AUTHTOK normally contains the password)\&. But when testing PAM modules, it\(cqs often nice to make sure a PAM module under test can retrieve data from the stack\&. The pam_set_items module makes this possible by reading environment variables and setting them as PAM items\&. .SH "OPTIONS" .sp None .SH "MODULE TYPES PROVIDED" .sp All module types (\fBaccount\fR, \fBauth\fR, \fBpassword\fR and \fBsession\fR) are provided\&. .SH "EXAMPLE" .sp Consider an example that tests that pam_unix is able to read a provided password and doesn\(cqt query on its own\&. The test service file would contain: .sp .if n \{\ .RS 4 .\} .nf auth required pam_set_items\&.so auth required pam_unix\&.so .fi .if n \{\ .RE .\} .sp Then the test would put the item to the test environment with: .sp .if n \{\ .RS 4 .\} .nf setenv("PAM_AUTHTOK", "secret"); .fi .if n \{\ .RE .\} .sp Then run the PAM conversation\&.