svn commit: samba r22184 - in branches/SAMBA_4_0/source/torture/auth: .

abartlet at samba.org abartlet at samba.org
Thu Apr 12 04:01:42 GMT 2007


Author: abartlet
Date: 2007-04-12 04:01:42 +0000 (Thu, 12 Apr 2007)
New Revision: 22184

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

Log:
On some hosts, parsing a compleatly invalid principal causes heimadal
to try and figure out what realm the current host is in (by DNS lookup
for it's full domain name).  We don't want to do that for this test,
just break the checksum.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/torture/auth/pac.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/auth/pac.c
===================================================================
--- branches/SAMBA_4_0/source/torture/auth/pac.c	2007-04-12 02:28:29 UTC (rev 22183)
+++ branches/SAMBA_4_0/source/torture/auth/pac.c	2007-04-12 04:01:42 UTC (rev 22184)
@@ -276,6 +276,7 @@
 	struct smb_krb5_context *smb_krb5_context;
 
 	const char *principal_string;
+	char *broken_principal_string;
 	krb5_principal client_principal;
 	const char *authtime_string;
 	time_t authtime;
@@ -575,8 +576,11 @@
 	/* Break the client principal */
 	krb5_free_principal(smb_krb5_context->krb5_context, client_principal);
 
+	broken_principal_string = talloc_strdup(mem_ctx, principal_string);
+	broken_principal_string[0]++;
+
 	ret = krb5_parse_name(smb_krb5_context->krb5_context,
-			      "not the right principal", &client_principal);
+			      broken_principal_string, &client_principal);
 	if (ret) {
 
 		krb5_free_keyblock_contents(smb_krb5_context->krb5_context, 
@@ -584,7 +588,7 @@
 		krb5_free_keyblock_contents(smb_krb5_context->krb5_context, 
 					    &server_keyblock);
 		torture_fail(tctx, talloc_asprintf(tctx, 
-						   "(saved test) parsing of bogus client principal failed: %s", 
+						   "(saved test) parsing of broken client principal failed: %s", 
 						   smb_get_krb5_error_message(smb_krb5_context->krb5_context, ret, mem_ctx)));
 	}
 



More information about the samba-cvs mailing list