1 /* pam_winbind header file
2 (Solaris needs some macros from Linux for common PAM code)
16 #include <sys/types.h>
23 #define MODULE_NAME "pam_winbind"
25 #define PAM_SM_ACCOUNT
26 #define PAM_SM_PASSWORD
28 #if defined(SUNOS5) || defined(SUNOS4) || defined(HPUX) || defined(FREEBSD)
30 /* Solaris always uses dynamic pam modules */
31 #define PAM_EXTERN extern
32 #include <security/pam_appl.h>
34 #ifndef PAM_AUTHTOK_RECOVER_ERR
35 #define PAM_AUTHTOK_RECOVER_ERR PAM_AUTHTOK_RECOVERY_ERR
40 #ifdef HAVE_SECURITY_PAM_MODULES_H
41 #include <security/pam_modules.h>
44 #ifdef HAVE_SECURITY__PAM_MACROS_H
45 #include <security/_pam_macros.h>
47 /* Define required macros from (Linux PAM 0.68) security/_pam_macros.h */
48 #define _pam_drop_reply(/* struct pam_response * */ reply, /* int */ replies) \
52 for (reply_i=0; reply_i<replies; ++reply_i) { \
53 if (reply[reply_i].resp) { \
54 _pam_overwrite(reply[reply_i].resp); \
55 free(reply[reply_i].resp); \
62 #define _pam_overwrite(x) \
64 register char *__xx__; \
71 * Don't just free it, forget it too.
74 #define _pam_drop(X) SAFE_FREE(X)
76 #define x_strdup(s) ( (s) ? strdup(s):NULL )
79 #define WINBIND_DEBUG_ARG (1<<0)
80 #define WINBIND_USE_AUTHTOK_ARG (1<<1)
81 #define WINBIND_UNKNOWN_OK_ARG (1<<2)
82 #define WINBIND_TRY_FIRST_PASS_ARG (1<<3)
83 #define WINBIND_USE_FIRST_PASS_ARG (1<<4)
84 #define WINBIND__OLD_PASSWORD (1<<5)
85 #define WINBIND_REQUIRED_MEMBERSHIP (1<<6)
88 * here is the string to inform the user that the new passwords they
89 * typed were not the same.
92 #define MISTYPED_PASS "Sorry, passwords do not match"
94 #define on(x, y) (x & y)
95 #define off(x, y) (!(x & y))
97 #include "winbind_client.h"