From 096a4473edfacbec961c6976d6c48bf39b05739a Mon Sep 17 00:00:00 2001 From: Johan Danielsson Date: Tue, 20 Jun 2000 14:57:41 +0000 Subject: [PATCH] back out 1.64 git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8415 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/krb5/principal.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/lib/krb5/principal.c b/lib/krb5/principal.c index 0ea990b39..4d301f3f0 100644 --- a/lib/krb5/principal.c +++ b/lib/krb5/principal.c @@ -547,9 +547,7 @@ struct v4_name_convert { */ static const char* -get_name_conversion(krb5_context context, - const char *realm, - const char *name) +get_name_conversion(krb5_context context, const char *realm, const char *name) { struct v4_name_convert *q; const char *p; @@ -605,7 +603,6 @@ krb5_425_conv_principal_ext(krb5_context context, krb5_error_code ret; krb5_principal pr; char host[128]; - char *low_realm = NULL; /* do the following: if the name is found in the `v4_name_convert:host' part, is is assumed to be a `host' type @@ -689,19 +686,14 @@ krb5_425_conv_principal_ext(krb5_context context, p = krb5_config_get_string(context, NULL, "realms", realm, "default_domain", NULL); if(p == NULL){ - low_realm = strdup (realm); - if (low_realm == NULL) - return ENOMEM; - strlwr (low_realm); - p = low_realm; + /* this should be an error, just faking a name is not good */ + return HEIM_ERR_V4_PRINC_NO_CONV; } if (*p == '.') ++p; snprintf(host, sizeof(host), "%s.%s", instance, p); ret = krb5_make_principal(context, &pr, realm, name, host, NULL); - if (low_realm) - free (low_realm); if(func == NULL || (*func)(context, pr)){ *princ = pr; return 0;