svn commit: samba r11215 - in branches/SAMBA_4_0/source/auth/kerberos: .

abartlet at samba.org abartlet at samba.org
Thu Oct 20 10:10:41 GMT 2005


Author: abartlet
Date: 2005-10-20 10:10:40 +0000 (Thu, 20 Oct 2005)
New Revision: 11215

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

Log:
Remove no-op prompter intended to work around bugs in old kerberos libs.  

I'm also worried this might cause loops, if we get a 'force password
change', and the prompter tries to 'deal with it'.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/auth/kerberos/kerberos.c


Changeset:
Modified: branches/SAMBA_4_0/source/auth/kerberos/kerberos.c
===================================================================
--- branches/SAMBA_4_0/source/auth/kerberos/kerberos.c	2005-10-20 10:04:57 UTC (rev 11214)
+++ branches/SAMBA_4_0/source/auth/kerberos/kerberos.c	2005-10-20 10:10:40 UTC (rev 11215)
@@ -35,32 +35,6 @@
 #define LIBADS_CCACHE_NAME "MEMORY:libads"
 
 /*
-  we use a prompter to avoid a crash bug in the kerberos libs when 
-  dealing with empty passwords
-  this prompter is just a string copy ...
-*/
-static krb5_error_code 
-kerb_prompter(krb5_context ctx, void *data,
-	       const char *name,
-	       const char *banner,
-	       int num_prompts,
-	       krb5_prompt prompts[])
-{
-	if (num_prompts == 0) return 0;
-
-	memset(prompts[0].reply->data, '\0', prompts[0].reply->length);
-	if (prompts[0].reply->length > 0) {
-		if (data) {
-			strncpy(prompts[0].reply->data, data, prompts[0].reply->length-1);
-			prompts[0].reply->length = strlen(prompts[0].reply->data);
-		} else {
-			prompts[0].reply->length = 0;
-		}
-	}
-	return 0;
-}
-
-/*
   simulate a kinit, putting the tgt in the given credentials cache. 
   Orignally by remus at snapserver.com
  
@@ -120,7 +94,7 @@
 	krb5_get_init_creds_opt_init(&options);
 
 	if ((code = krb5_get_init_creds_password(ctx, &my_creds, principal, password, 
-						 kerb_prompter, 
+						 NULL, 
 						 NULL, 0, NULL, &options))) {
 		return code;
 	}



More information about the samba-cvs mailing list