From a22d8d987c2b6c373d5f7db6f1afa5e701ebfef2 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 17 Mar 2006 14:18:05 +0000 Subject: r14513: Fix winbindd_chauthtok: only fallback when the chgpasswd3 call is not supported. Is there a better way to check for the 0x1c010002 status code? Guenther (This used to be commit c7268dc9ac304e1b6dac80762087a57484906103) --- source3/nsswitch/winbindd_pam.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source3/nsswitch') diff --git a/source3/nsswitch/winbindd_pam.c b/source3/nsswitch/winbindd_pam.c index e2b4297564..8b400fc1f1 100644 --- a/source3/nsswitch/winbindd_pam.c +++ b/source3/nsswitch/winbindd_pam.c @@ -1655,8 +1655,11 @@ void winbindd_pam_chauthtok(struct winbindd_cli_state *state) reject.reject_reason; got_info = True; - - } else if (!NT_STATUS_IS_OK(result)) { + + /* only fallback when the chgpasswd3 call is not supported */ + } else if ((result.v == 0x1c010002) || + (NT_STATUS_EQUAL(result, NT_STATUS_NOT_SUPPORTED)) || + (NT_STATUS_EQUAL(result, NT_STATUS_NOT_IMPLEMENTED))) { DEBUG(10,("Password change with chgpasswd3 failed with: %s, retrying chgpasswd_user\n", nt_errstr(result))); -- cgit