diff options
-rw-r--r-- | source3/nsswitch/pam_winbind.c | 25 | ||||
-rw-r--r-- | source3/nsswitch/winbind_nss_solaris.c | 6 |
2 files changed, 27 insertions, 4 deletions
diff --git a/source3/nsswitch/pam_winbind.c b/source3/nsswitch/pam_winbind.c index cad75f7907..b192a347f4 100644 --- a/source3/nsswitch/pam_winbind.c +++ b/source3/nsswitch/pam_winbind.c @@ -482,6 +482,27 @@ int pam_sm_acct_mgmt(pam_handle_t *pamh, int flags, /* should not be reached */ return PAM_IGNORE; } +PAM_EXTERN +int pam_sm_open_session(pam_handle_t *pamh, int flags, + int argc, const char **argv) +{ + /* parse arguments */ + int ctrl = _pam_parse(argc, argv); + if (ctrl & WINBIND_DEBUG_ARG) + _pam_log(LOG_DEBUG,"libpam_winbind:pam_sm_open_session handler"); + return PAM_SUCCESS; +} +PAM_EXTERN +int pam_sm_close_session(pam_handle_t *pamh, int flags, + int argc, const char **argv) +{ + /* parse arguments */ + int ctrl = _pam_parse(argc, argv); + if (ctrl & WINBIND_DEBUG_ARG) + _pam_log(LOG_DEBUG,"libpam_winbind:pam_sm_close_session handler"); + return PAM_SUCCESS; +} + PAM_EXTERN int pam_sm_chauthtok(pam_handle_t * pamh, int flags, @@ -650,8 +671,8 @@ struct pam_module _pam_winbind_modstruct = { pam_sm_authenticate, pam_sm_setcred, pam_sm_acct_mgmt, - NULL, - NULL, + pam_sm_open_session, + pam_sm_close_session, pam_sm_chauthtok }; diff --git a/source3/nsswitch/winbind_nss_solaris.c b/source3/nsswitch/winbind_nss_solaris.c index 9c71c75e9d..8bf1487f5a 100644 --- a/source3/nsswitch/winbind_nss_solaris.c +++ b/source3/nsswitch/winbind_nss_solaris.c @@ -10,12 +10,14 @@ #include <sys/param.h> #include <string.h> #include <pwd.h> +#include "includes.h" #include <syslog.h> +#if !defined(HPUX) #include <sys/syslog.h> -#include "includes.h" +#endif /*hpux*/ #include "winbind_nss_config.h" -#ifdef HAVE_NSS_COMMON_H +#if defined(HAVE_NSS_COMMON_H) || defined(HPUX) #undef NSS_DEBUG |