r14513: Fix winbindd_chauthtok: only fallback when the chgpasswd3 call is not
authorGünther Deschner <gd@samba.org>
Fri, 17 Mar 2006 14:18:05 +0000 (14:18 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:15:35 +0000 (11:15 -0500)
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

index e2b4297564f838596acff1180167836df717b0c4..8b400fc1f1bede492940a9b96a8e6f7a9d72af93 100644 (file)
@@ -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)));