#include <stdio.h>
#include <string.h>
+#ifdef HAVE_KRB4
#include <krb.h>
+#else
+#include <mr_krb.h>
+#endif
#include <krb5.h>
RCSID("$Header$");
char *p, *first, *data;
char name[ANAME_SZ], inst[INST_SZ], realm[REALM_SZ];
char aname[ANAME_SZ], ainst[INST_SZ], arealm[REALM_SZ];
+ char *lrealm = NULL;
size_t size;
long code;
struct utsname uts;
{
strcpy(aname, master);
strcpy(ainst, "");
- if (krb_get_lrealm(arealm, 1))
+ if (!krb5_get_default_realm(context, &lrealm))
+ {
+ strcpy(arealm, lrealm);
+ }
+ else
strcpy(arealm, KRB_REALM);
}
code = EPERM;
have_authorization = 1;
out:
+ if (lrealm)
+ free(lrealm);
if (client)
krb5_free_principal(context, client);
if (server)