Skip to content

Commit

Permalink
Add a noop pam_sm_close_session() implementation
Browse files Browse the repository at this point in the history
Apparently PAM requires all functions in the group to be defined even if
a noop is desired.
  • Loading branch information
ifreund committed Mar 6, 2022
1 parent e3ebc5b commit 11d0c52
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pam_dumb_runtime_dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,16 @@ int pam_sm_open_session(pam_handle_t *pamh, int flags,

return PAM_SUCCESS;
}

/* PAM requires all functions in a group to be defined, even if a noop is
* desired. Otherwise, PAM_MODULE_UNKNOWN is returned when the application
* calls pam_close_session(3). */
int pam_sm_close_session(pam_handle_t *pamh, int flags,
int argc, const char **argv) {
(void)pamh;
(void)flags;
(void)argc;
(void)argv;

return PAM_SUCCESS;
}

0 comments on commit 11d0c52

Please sign in to comment.