#include <string.h>
#include <unistd.h>
+#ifdef HAVE_KRB4
#include <krb.h>
+#endif
#include <krb5.h>
RCSID("$Header$");
time_t now;
char *host;
-char krb_realm[REALM_SZ];
krb5_context context = NULL;
+char *krb_realm = NULL;
/* Client array and associated data. This needs to be global for _list_users */
client **clients;
}
}
- krb_get_lrealm(krb_realm, 1);
-
status = krb5_init_context(&context);
if (status)
{
exit(1);
}
+ status = krb5_get_default_realm(context, &krb_realm);
+ if (status)
+ {
+ com_err(whoami, status, "Getting default Kerberos realm.");
+ exit(1);
+ }
+
/*
* Database initialization. Only init if database should be open.
*/