1PAM_GET_ITEMS(8) PAM_GET_ITEMS(8)
2
3
4
6 pam_get_items - A PAM test module to retrieve module-specific PAM items
7
9 pam_get_items.so
10
12 PAM modules store data in PAM items. These items are only accessible
13 from module context, not application context as they might include
14 private data (PAM_AUTHTOK normally contains the password). But when
15 testing PAM modules, it’s often nice to make sure a PAM module under
16 test sets items for the next module the way it’s supposed to. The
17 pam_get_items module makes this possible by exporting all PAM items as
18 environment variables using pam_putenv. The environment variable name
19 is the same as the constant name of the PAM item.
20
22 None
23
25 All module types (account, auth, password and session) are provided.
26
28 Consider an example that tests that pam_unix puts the password it reads
29 onto PAM stack. The test service file would contain:
30
31 auth required pam_unix.so
32 auth required pam_get_items.so
33
34 Then the test would run the PAM conversation and afterwards call:
35
36 pam_getenv(pamh, "PAM_AUTHTOK");
37
38 To retrieve the password.
39
40
41
42 2015-11-04 PAM_GET_ITEMS(8)