]> granicus.if.org Git - linux-pam/blob - modules/README
Relevant BUGIDs: 128298
[linux-pam] / modules / README
1 This directory contains the modules.
2
3 If you want to reserve a module name please email <pam-list@redhat.com>
4 and announce its name. Andrew Morgan, <morgan@linux.kernel.org>, will
5 add it to the Makefile in the next release of Linux-PAM.
6
7 As of Linux-PAM-0.40 modules can optionally conform to the static
8 modules conventions.
9
10 This file was updated for Linux-PAM-0.53.
11
12 The conventions are as follows:
13
14 There are only 6 functions that a module may declare as "public" they
15 fall into 4 managment groups as follows:
16
17         functions                                       Management group
18         ------------------------------------------      ----------------
19         pam_sm_authenticate, pam_sm_setcred,            PAM_SM_AUTH
20         pam_sm_acct_mgmt,                               PAM_SM_ACCOUNT
21         pam_sm_open_session, pam_sm_close_session,      PAM_SM_SESSION
22         pam_sm_chauthtok                                PAM_SM_PASSWORD
23
24 If a module contains definitions for any of the above functions, it
25 must supply definitions for all of the functions in the corresponding
26 management group.
27
28 The header file that defines the ANSI prototypes for these functions
29 is <security/pam_modules.h> . In the case that the module wishes to
30 offer the functions of a given managment group, it must #define
31 PAM_SM_XXX, where XXX is one of the above four tokens. These
32 definitions must occur *prior* to the 
33 #include <security/pam_modules.h> line.
34
35 The pam_sm_... functions should be defined to be of type 'PAM_EXTERN int'.
36
37 In the case that a module is being compiled with PAM_STATIC #define'd
38 it should also define a globally accessible structure
39 _"NAME"_modstruct containing references to each of the functions
40 defined by the module. (this structure is defined in
41 <security/pam_modules.h>.  "NAME" is the title of the module
42 (eg. "pam_deny")
43
44 If a module wants to be included in the static libpam.a its Makefile
45 should execute "register_static" with appropriate arguments (in this
46 directory).
47
48 [
49 For SIMPLE working examples, see
50
51         ./modules/pam_deny/* and ./modules/pam_rootok/* 
52 .]
53
54 Andrew Morgan
55 96/11/10