#include <stdio.h>
#include <strings.h>
#include <gdb.h>
-#include "kludge.h"
#include <krb.h>
+#include <krb_et.h>
#include <netinet/in.h>
#include <errno.h>
bcopy(STRING_DATA(data), ticket_st.dat, MAX_STRING_SIZE(data));
code = krb_rd_req(&ticket_st, service,
PrincipalHostname(host), 0,
- &ad, "/etc/srvtab");
+ &ad, KEYFILE);
if (code) {
- code = krb_err_frob(code);
+ code += ERROR_TABLE_BASE_krb;
strcpy(ad.pname, qmark);
strcpy(ad.pinst, qmark);
strcpy(ad.prealm, qmark);
goto auth_failed;
}
- if (get_krbrlm(realm,0))
- realm[0] = '\0';
+ if (krb_get_lrealm(realm,1))
+ strcpy(realm, KRB_REALM);
code = EPERM;
if (strcmp(master, ad.pname))
goto auth_failed;