X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/blobdiff_plain/29bc4461c835d37a6a30884f5b7187c6176bf8bd..71a6c578b8f6b270bfd8789af86accf856918553:/reg_svr/admin_call.c diff --git a/reg_svr/admin_call.c b/reg_svr/admin_call.c index e84c1601..ecbcc2c7 100644 --- a/reg_svr/admin_call.c +++ b/reg_svr/admin_call.c @@ -10,24 +10,6 @@ * Original version written by Jeffery I. Schiller, January 1987 * Completely gutted and rewritten by Bill Sommerfeld, August 1987 * - * $Log$ - * Revision 1.5 1988-08-01 00:42:54 qjb - * Changed names of kerberos calls to new names from old ones. - * - * Revision 1.4 87/09/09 14:59:06 wesommer - * Allocate a new socket each time rather than keeping one around, - * due to protocol problems. - * - * Revision 1.3 87/09/04 22:30:34 wesommer - * Un-crock the KDC host (oops -- this one got distributed!!). - * - * Revision 1.2 87/08/22 17:13:59 wesommer - * Make admin_errmsg external rather than static. - * Crock up KDC host. - * - * Revision 1.1 87/08/07 13:50:37 wesommer - * Initial revision - * */ #ifndef lint @@ -65,6 +47,7 @@ static struct sockaddr_in my_addr; /* address bound to admin_fd. */ static int my_addr_len; /* size of above address. */ static char krbrlm[REALM_SZ]; /* Local kerberos realm */ +static char krbhost[BUFSIZ]; /* Name of server for local realm */ char admin_errmsg[BUFSIZ]; /* Server error message */ /* @@ -89,7 +72,11 @@ int admin_call_init() * Locate server. */ - hp = gethostbyname(KERB_HOST); + if (status = get_krbhst(krbhost, krbrlm, 1)) { + status += krb_err_base; + goto punt; + } + hp = gethostbyname(krbhost); if (!hp) { status = ADMIN_UNKNOWN_HOST; goto punt;