Defines | |
#define | PAM_SM_SESSION |
#define | MACS_PW_TMPFILE "/etc/npasswd" |
#define | MACS_PW_ADD 1 |
#define | MACS_PW_DEL 2 |
Functions | |
passwd * | _pam_macs_mkpwent (_pam_macs_config *c) |
int | _macs_putpwent (struct passwd *pwent, FILE *file) |
Write a passwd struct to a FILE. | |
int | _pam_macs_mungepasswd (_pam_macs_config *c, int action) |
Modify /etc/passwd. | |
PAM_EXTERN int | pam_sm_open_session (pam_handle_t *pamh, int flags, int argc, const char **argv) |
Set up a session. | |
PAM_EXTERN int | pam_sm_close_session (pam_handle_t *pamh, int flags, int argc, const char **argv) |
Tear down a session. |
This function inherits information from the Authentication Management group; therefore, it should only be configured to run in addition to the authentication routines.
Usage in the PAM configuration file:
pam_macs_sess [p [d]] [v|q]
p
toggles our creation of passwd entries (w/ nss) [ MACS_DEF_P ]d
toggles our deletion of passwd entries (w/ nss) [ MACS_DEF_D ]v
increases, q
decreases verbosity. [ MACS_DEF_V ]
|
This tells the pam headers that we're an auth piece. |
|
The name of the temporary passwd file. |
|
Tells _pam_macs_mungepasswd to add the give pwent to /etc/passwd |
|
Tells _pam_macs_mungepasswd to remove the give pwent from /etc/passwd |
|
Initializes and returns a passwd entry. |
|
Write a passwd struct to a FILE.
|
|
Modify /etc/passwd.
|
|
Set up a session. If there's no such user, and if we're not configured not to, we add an entry to /etc/passwd. You might also like to look at the mkhomedir module. This is a PAM entry point. It is called by libpam. |
|
Tear down a session. If we're not configured not to, we delete an entry from /etc/passwd. This is a PAM entry point. It is called by libpam. |