From 6bcd165944f0eb814a2123eecbf4c94848bb3ecf Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Sat, 26 Mar 1994 06:23:56 +0000 Subject: [PATCH] get local realm from master_princ instead of from krb5_get_default_realm() git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3475 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kdc/kerberos_v4.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/kdc/kerberos_v4.c b/src/kdc/kerberos_v4.c index 83a7434a4..d605a4167 100644 --- a/src/kdc/kerberos_v4.c +++ b/src/kdc/kerberos_v4.c @@ -384,6 +384,7 @@ main(argc, argv) #include #include #include +#include "extern.h" /* to pick up master_princ */ static krb5_error_code retval; static krb5_data *response; @@ -419,18 +420,12 @@ krb5_data **resp; return(retval); if (!*local_realm) { /* local-realm name already set up */ - retval = krb5_get_default_realm(&lrealm); - if (!retval) { - if (strlen(lrealm) < sizeof(local_realm)) - strcpy(local_realm, lrealm); - else - retval = KRB5_CONFIG_NOTENUFSPACE; - } - if (retval) { - com_err("KRBV4KDC", retval, - "while attempting to get default realm"); - exit(1); - } + /* XXX assumes realm is null-terminated! */ + lrealm = master_princ->realm.data; + if (strlen(lrealm) < sizeof(local_realm)) + strcpy(local_realm, lrealm); + else + retval = KRB5_CONFIG_NOTENUFSPACE; } /* convert client_fulladdr to client_sockaddr: */ -- 2.26.2