diff options
author | Tim Potter <tpot@samba.org> | 2001-05-07 05:03:40 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2001-05-07 05:03:40 +0000 |
commit | ebb900cf3ed9cf7627f1bbe724fb1e9c1e35e057 (patch) | |
tree | a21102514f5877e1fca9986db809eb957356a79a /source3/nsswitch/pam_winbind.h | |
parent | a36f9250e7c9446f3eece6d8db29fcbde99256fb (diff) | |
download | samba-ebb900cf3ed9cf7627f1bbe724fb1e9c1e35e057.tar.gz samba-ebb900cf3ed9cf7627f1bbe724fb1e9c1e35e057.tar.xz samba-ebb900cf3ed9cf7627f1bbe724fb1e9c1e35e057.zip |
iAdditional files for winbind merge.
(This used to be commit 38ab3b31b5dc39fb59f224b399bb9c2269f1c933)
Diffstat (limited to 'source3/nsswitch/pam_winbind.h')
-rw-r--r-- | source3/nsswitch/pam_winbind.h | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/source3/nsswitch/pam_winbind.h b/source3/nsswitch/pam_winbind.h new file mode 100644 index 0000000000..85707cb4dc --- /dev/null +++ b/source3/nsswitch/pam_winbind.h @@ -0,0 +1,85 @@ +/* pam_winbind header file + (Solaris needs some macros from Linux for common PAM code) + + Shirish Kalele 2000 +*/ + +#ifdef HAVE_FEATURES_H +#include <features.h> +#endif + +#include <stdlib.h> +#include <unistd.h> +#include <string.h> +#include <syslog.h> +#include <stdarg.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <errno.h> + +#include <config.h> + +#define MODULE_NAME "pam_winbind" +#define PAM_SM_AUTH +#define PAM_SM_ACCOUNT +#define PAM_SM_PASSWORD + +#if defined(SUNOS5) || defined(SUNOS4) + +/* Solaris always uses dynamic pam modules */ +#define PAM_EXTERN extern +#include <security/pam_appl.h> + +#define PAM_AUTHTOK_RECOVER_ERR PAM_AUTHTOK_RECOVERY_ERR +#endif + +#include <security/pam_modules.h> + +#ifdef HAVE_SECURITY__PAM_MACROS_H +#include <security/_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) \ +do { \ + int reply_i; \ + \ + for (reply_i=0; reply_i<replies; ++reply_i) { \ + if (reply[reply_i].resp) { \ + _pam_overwrite(reply[reply_i].resp); \ + free(reply[reply_i].resp); \ + } \ + } \ + if (reply) \ + free(reply); \ +} while (0) + +#define _pam_overwrite(x) \ +do { \ + register char *__xx__; \ + if ((__xx__=(x))) \ + while (*__xx__) \ + *__xx__++ = '\0'; \ +} while (0) + +/* + * Don't just free it, forget it too. + */ + +#define _pam_drop(X) \ +do { \ + if (X) { \ + free(X); \ + X=NULL; \ + } \ +} while (0) + +#define x_strdup(s) ( (s) ? strdup(s):NULL ) +#endif + +#define PAM_DEBUG_ARG (1<<0) +#define PAM_USE_AUTHTOK_ARG (1<<1) +#define PAM_UNKNOWN_OK_ARG (1<<2) + +#include "winbind_nss_config.h" +#include "winbindd_nss.h" |