From: Tom Yu Date: Sat, 26 Mar 1994 06:23:56 +0000 (+0000) Subject: get local realm from master_princ instead of from krb5_get_default_realm() X-Git-Tag: krb5-1.0-beta4~221 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6bcd165944f0eb814a2123eecbf4c94848bb3ecf;p=krb5.git 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 --- 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: */