2 * This file replaces some of the routines in the Kerberos utilities.
3 * It is based on the Kerberos library modules:
6 * Copyright 1987, 1988, 1992 by the Massachusetts Institute of Technology.
8 * For copying and distribution information, please see the file
13 static char rcsid_send_to_kdc_c[] =
18 #include <kerberosIV/mit-copyright.h>
30 #include "aklog.h" /* for struct afsconf_cell */
34 #include <afs/param.h>
35 #include <afs/cellconfig.h>
39 #define S_AD_SZ sizeof(struct sockaddr_in)
41 char *afs_realm_of_cell(context, cellconfig)
43 struct afsconf_cell *cellconfig;
45 char krbhst[MAX_HSTNM];
46 static char krbrlm[REALM_SZ+1];
48 krb5_error_code retval;
52 if (retval = krb5_get_host_realm(context,
53 cellconfig->hostName[0], &hrealms))
55 if(!hrealms[0]) return 0;
56 strcpy(krbrlm, hrealms[0]);
58 if (hrealms) krb5_free_host_realm(context, hrealms);