Index: samba/source/auth/pampass.c =================================================================== --- samba/source/auth/pampass.c.orig +++ samba/source/auth/pampass.c @@ -41,7 +41,11 @@ * which determines what actions/limitations/allowances become affected. *********************************************************************/ +#if defined(HAVE_SECURITY_PAM_APPL_H) #include <security/pam_appl.h> +#elif defined(HAVE_PAM_PAM_APPL_H) +#include <pam/pam_appl.h> +#endif /* * Structure used to communicate between the conversation function Index: samba/source/lib/pam_errors.c =================================================================== --- samba/source/lib/pam_errors.c.orig +++ samba/source/lib/pam_errors.c @@ -21,7 +21,11 @@ #include "includes.h" #ifdef WITH_PAM +#if defined(HAVE_SECURITY_PAM_APPL_H) #include <security/pam_appl.h> +#elif defined(HAVE_PAM_PAM_APPL_H) +#include <pam/pam_appl.h> +#endif #if defined(PAM_AUTHTOK_RECOVERY_ERR) && !defined(PAM_AUTHTOK_RECOVER_ERR) #define PAM_AUTHTOK_RECOVER_ERR PAM_AUTHTOK_RECOVERY_ERR Index: samba/source/nsswitch/pam_winbind.h =================================================================== --- samba/source/nsswitch/pam_winbind.h.orig +++ samba/source/nsswitch/pam_winbind.h @@ -23,7 +23,11 @@ /* Solaris always uses dynamic pam modules */ #define PAM_EXTERN extern +#if defined(HAVE_SECURITY_PAM_APPL_H) #include <security/pam_appl.h> +#elif defined(HAVE_PAM_PAM_APPL_H) +#include <pam/pam_appl.h> +#endif #ifndef PAM_AUTHTOK_RECOVER_ERR #define PAM_AUTHTOK_RECOVER_ERR PAM_AUTHTOK_RECOVERY_ERR @@ -31,12 +35,16 @@ #endif /* defined(SUNOS5) || defined(SUNOS4) || defined(HPUX) || defined(FREEBSD) || defined(AIX) */ -#ifdef HAVE_SECURITY_PAM_MODULES_H +#if defined(HAVE_SECURITY_PAM_MODULES_H) #include <security/pam_modules.h> +#elif defined(HAVE_PAM_PAM_MODULES_H) +#include <pam/pam_modules.h> #endif -#ifdef HAVE_SECURITY__PAM_MACROS_H +#if defined(HAVE_SECURITY__PAM_MACROS_H) #include <security/_pam_macros.h> +#elif defined(HAVE_PAM__PAM_MACROS_H) +#include <pam/_pam_macros.h> #else /* Define required macros from (Linux PAM 0.68) security/_pam_macros.h */ #define _pam_drop_reply(/* struct pam_response * */ reply, /* int */ replies) \ Index: samba/source/pam_smbpass/general.h =================================================================== --- samba/source/pam_smbpass/general.h.orig +++ samba/source/pam_smbpass/general.h @@ -1,9 +1,17 @@ #ifndef LINUX /* This is only needed by modules in the Sun implementation. */ +#if defined(HAVE_SECURITY_PAM_APPL_H) #include <security/pam_appl.h> +#elif defined(HAVE_PAM_PAM_APPL_H) +#include <pam/pam_appl.h> +#endif #endif /* LINUX */ +#if defined(HAVE_SECURITY_PAM_MODULES_H) #include <security/pam_modules.h> +#elif defined(HAVE_PAM_PAM_MODULES_H) +#include <pam/pam_modules.h> +#endif #ifndef PAM_AUTHTOK_RECOVER_ERR #define PAM_AUTHTOK_RECOVER_ERR PAM_AUTHTOK_RECOVERY_ERR Index: samba/source/pam_smbpass/pam_smb_acct.c =================================================================== --- samba/source/pam_smbpass/pam_smb_acct.c.orig +++ samba/source/pam_smbpass/pam_smb_acct.c @@ -23,11 +23,19 @@ #ifndef LINUX /* This is only used in the Sun implementation. */ +#if defined(HAVE_SECURITY_PAM_APPL_H) #include <security/pam_appl.h> +#elif defined(HAVE_PAM_PAM_APPL_H) +#include <pam/pam_appl.h> +#endif #endif /* LINUX */ +#if defined(HAVE_SECURITY_PAM_MODULES_H) #include <security/pam_modules.h> +#elif defined(HAVE_PAM_PAM_MODULES_H) +#include <pam/pam_modules.h> +#endif #include "general.h" Index: samba/source/pam_smbpass/pam_smb_auth.c =================================================================== --- samba/source/pam_smbpass/pam_smb_auth.c.orig +++ samba/source/pam_smbpass/pam_smb_auth.c @@ -24,11 +24,19 @@ #ifndef LINUX /* This is only used in the Sun implementation. */ +#if defined(HAVE_SECURITY_PAM_APPL_H) #include <security/pam_appl.h> +#elif defined(HAVE_PAM_PAM_APPL_H) +#include <pam/pam_appl.h> +#endif #endif /* LINUX */ +#if defined(HAVE_SECURITY_PAM_MODULES_H) #include <security/pam_modules.h> +#elif defined(HAVE_PAM_PAM_MODULES_H) +#include <pam/pam_modules.h> +#endif #include "general.h" Index: samba/source/pam_smbpass/pam_smb_passwd.c =================================================================== --- samba/source/pam_smbpass/pam_smb_passwd.c.orig +++ samba/source/pam_smbpass/pam_smb_passwd.c @@ -29,10 +29,18 @@ and others (including FreeBSD). */ #ifndef LINUX +#if defined(HAVE_SECURITY_PAM_APPL_H) #include <security/pam_appl.h> +#elif defined(HAVE_PAM_PAM_APPL_H) +#include <pam/pam_appl.h> +#endif #endif +#if defined(HAVE_SECURITY_PAM_MODULES_H) #include <security/pam_modules.h> +#elif defined(HAVE_PAM_PAM_MODULES_H) +#include <pam/pam_modules.h> +#endif #include "general.h"