svn commit: samba r7450 - branches/SAMBA_3_0/source/auth trunk/source/auth

jerry at samba.org jerry at samba.org
Thu Jun 9 18:45:56 GMT 2005


Author: jerry
Date: 2005-06-09 18:45:56 +0000 (Thu, 09 Jun 2005)
New Revision: 7450

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

Log:
fix my bone head mistake with ntlm authentcation and 'map to guest = bad uid'; make sure the authentication suceeds
Modified:
   branches/SAMBA_3_0/source/auth/auth.c
   branches/SAMBA_3_0/source/auth/auth_util.c
   trunk/source/auth/auth.c
   trunk/source/auth/auth_util.c


Changeset:
Modified: branches/SAMBA_3_0/source/auth/auth.c
===================================================================
--- branches/SAMBA_3_0/source/auth/auth.c	2005-06-09 18:43:56 UTC (rev 7449)
+++ branches/SAMBA_3_0/source/auth/auth.c	2005-06-09 18:45:56 UTC (rev 7450)
@@ -312,15 +312,10 @@
 	
 	/* failed authentication; check for guest lapping */
 	
-	if ( lp_map_to_guest() == MAP_TO_GUEST_ON_BAD_UID ) {
-	 	make_server_info_guest(server_info); 
-		nt_status = NT_STATUS_OK;
-	 } else {
-		DEBUG(2, ("check_ntlm_password:  Authentication for user [%s] -> [%s] FAILED with error %s\n", 
-	  	user_info->smb_name.str, user_info->internal_username.str, 
-	  	nt_errstr(nt_status)));
-		ZERO_STRUCTP(server_info); 
-	}
+	DEBUG(2, ("check_ntlm_password:  Authentication for user [%s] -> [%s] FAILED with error %s\n", 
+  	user_info->smb_name.str, user_info->internal_username.str, 
+  	nt_errstr(nt_status)));
+	ZERO_STRUCTP(server_info); 
 	
 	return nt_status;
 }

Modified: branches/SAMBA_3_0/source/auth/auth_util.c
===================================================================
--- branches/SAMBA_3_0/source/auth/auth_util.c	2005-06-09 18:43:56 UTC (rev 7449)
+++ branches/SAMBA_3_0/source/auth/auth_util.c	2005-06-09 18:45:56 UTC (rev 7450)
@@ -1161,7 +1161,15 @@
 			&found_username, &uid, &gid, &sam_account );
 	}
 	
+	/* if we still don't have a valid unix account check for 
+	  'map to gues = bad uid' */
+	  
 	if (!NT_STATUS_IS_OK(nt_status)) {
+		if ( lp_map_to_guest() == MAP_TO_GUEST_ON_BAD_UID ) {
+		 	make_server_info_guest(server_info); 
+			return NT_STATUS_OK;
+		}
+		
 		DEBUG(0, ("make_server_info_info3: pdb_init_sam failed!\n"));
 		return nt_status;
 	}

Modified: trunk/source/auth/auth.c
===================================================================
--- trunk/source/auth/auth.c	2005-06-09 18:43:56 UTC (rev 7449)
+++ trunk/source/auth/auth.c	2005-06-09 18:45:56 UTC (rev 7450)
@@ -312,15 +312,10 @@
 	
 	/* failed authentication; check for guest lapping */
 	
-	if ( lp_map_to_guest() == MAP_TO_GUEST_ON_BAD_UID ) {
-	 	make_server_info_guest(server_info); 
-		nt_status = NT_STATUS_OK;
-	 } else {
-		DEBUG(2, ("check_ntlm_password:  Authentication for user [%s] -> [%s] FAILED with error %s\n", 
-	  	user_info->smb_name.str, user_info->internal_username.str, 
-	  	nt_errstr(nt_status)));
-		ZERO_STRUCTP(server_info); 
-	}
+	DEBUG(2, ("check_ntlm_password:  Authentication for user [%s] -> [%s] FAILED with error %s\n", 
+  	user_info->smb_name.str, user_info->internal_username.str, 
+  	nt_errstr(nt_status)));
+	ZERO_STRUCTP(server_info); 
 	
 	return nt_status;
 }

Modified: trunk/source/auth/auth_util.c
===================================================================
--- trunk/source/auth/auth_util.c	2005-06-09 18:43:56 UTC (rev 7449)
+++ trunk/source/auth/auth_util.c	2005-06-09 18:45:56 UTC (rev 7450)
@@ -1161,7 +1161,15 @@
 			&found_username, &uid, &gid, &sam_account );
 	}
 	
+	/* if we still don't have a valid unix account check for 
+	  'map to gues = bad uid' */
+	  
 	if (!NT_STATUS_IS_OK(nt_status)) {
+		if ( lp_map_to_guest() == MAP_TO_GUEST_ON_BAD_UID ) {
+		 	make_server_info_guest(server_info); 
+			return NT_STATUS_OK;
+		}
+		
 		DEBUG(0, ("make_server_info_info3: pdb_init_sam failed!\n"));
 		return nt_status;
 	}



More information about the samba-cvs mailing list