#include <stdlib.h>
#include <string.h>
+#ifdef HAVE_KRB4
#include <krb.h>
+#else
+#include <mr_krb.h>
+#endif
#include <krb5.h>
EXEC SQL INCLUDE sqlca;
RCSID("$Header$");
-static char defaultrealm[REALM_SZ];
+static char *defaultrealm = NULL;
static struct hash *users, *strings;
void init_acls(void)
{
+ krb5_context context = NULL;
+ int code;
+
users = create_hash(2000);
strings = create_hash(2000);
- krb_get_lrealm(defaultrealm, 1);
+
+ code = krb5_init_context(&context);
+ if (code)
+ goto out;
+
+ code = krb5_get_default_realm(context, &defaultrealm);
+ if (code)
+ goto out;
+
+ out:
+ if (context)
+ krb5_free_context(context);
}
void dump_krb_acl(FILE *out, char *type, int id, int vers)
krb5_principal client = NULL;
int status = 0;
- if (kname_parse(name, inst, realm, kbuf) != KSUCCESS)
+ if (mr_kname_parse(name, inst, realm, kbuf) != 0)
goto out;
status = krb5_init_context(&context);