svn commit: samba r14513 - branches/SAMBA_3_0/source/nsswitch trunk/source/nsswitch

gd at samba.org gd at samba.org
Fri Mar 17 14:18:06 GMT 2006


Author: gd
Date: 2006-03-17 14:18:05 +0000 (Fri, 17 Mar 2006)
New Revision: 14513

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14513

Log:
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

Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd_pam.c
   trunk/source/nsswitch/winbindd_pam.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_pam.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd_pam.c	2006-03-17 13:57:00 UTC (rev 14512)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_pam.c	2006-03-17 14:18:05 UTC (rev 14513)
@@ -1655,9 +1655,12 @@
 			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)));
 		

Modified: trunk/source/nsswitch/winbindd_pam.c
===================================================================
--- trunk/source/nsswitch/winbindd_pam.c	2006-03-17 13:57:00 UTC (rev 14512)
+++ trunk/source/nsswitch/winbindd_pam.c	2006-03-17 14:18:05 UTC (rev 14513)
@@ -1655,9 +1655,12 @@
 			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)));
 		



More information about the samba-cvs mailing list