diff options
author | Andrew Bartlett <abartlet@samba.org> | 2002-02-05 09:40:36 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2002-02-05 09:40:36 +0000 |
commit | ed389ee8dc9246b2d6c4e483cee16f7255b9a7f5 (patch) | |
tree | 7cb6e1a429f7e996f051f75f91cef2ffe4d69f24 /source3/nsswitch/pam_winbind.h | |
parent | 209467ece15e2942c5105042f639e16b96fb8d3b (diff) | |
download | samba-ed389ee8dc9246b2d6c4e483cee16f7255b9a7f5.tar.gz samba-ed389ee8dc9246b2d6c4e483cee16f7255b9a7f5.tar.bz2 samba-ed389ee8dc9246b2d6c4e483cee16f7255b9a7f5.zip |
Drastic impromvents to pam_winbind.
This adds code to do generic PAM -> NTSTATUS and NTSTATUS -> PAM error
conversions, and uses them to make the error handling in pam_winbind sane.
In particular, pam_winbind now uses PAM error codes, not silly '-1, -2 ...'
stuff, and logs the NTSTATUS error that winbind now sends over the pipe.
Added code to wbinfo to display these - makes a big difference in debugging
winbindd.
The main change here is the code to allow pam_winbind password changing to
correctly stack - This code ripped from pam_unix, and the copyright attached.
(Same as for all pam modules, including pam_winbind)
Andrew Bartlett
(This used to be commit dc1a72f896b83bc1ad3c7bf6c12c36ace3967280)
Diffstat (limited to 'source3/nsswitch/pam_winbind.h')
-rw-r--r-- | source3/nsswitch/pam_winbind.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/source3/nsswitch/pam_winbind.h b/source3/nsswitch/pam_winbind.h index 991c117656..93d9ec9e73 100644 --- a/source3/nsswitch/pam_winbind.h +++ b/source3/nsswitch/pam_winbind.h @@ -73,9 +73,22 @@ do { \ #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) +#define WINBIND_DEBUG_ARG (1<<0) +#define WINBIND_USE_AUTHTOK_ARG (1<<1) +#define WINBIND_UNKNOWN_OK_ARG (1<<2) +#define WINBIND_TRY_FIRST_PASS_ARG (1<<3) +#define WINBIND_USE_FIRST_PASS_ARG (1<<4) +#define WINBIND__OLD_PASSWORD (1<<5) + +/* + * here is the string to inform the user that the new passwords they + * typed were not the same. + */ + +#define MISTYPED_PASS "Sorry, passwords do not match" + +#define on(x, y) (x & y) +#define off(x, y) (!(x & y)) #include "winbind_nss_config.h" #include "winbindd_nss.h" |