/* too bad we can't set the pathname easily */
static char *srvtab = KEYFILE; /* default == /etc/srvtab */
static char realm[REALM_SZ];
-static char master[] = "sms";
-static char service[] = "rcmd";
-
-extern char *tkt_string(), *PrincipalHostname();
+static char master[INST_SZ] = "sms";
+static char service[ANAME_SZ] = "rcmd";
static init()
pass = 1;
init();
- strcpy(phost, PrincipalHostname(host));
+ strcpy(phost, krb_get_phost(host));
try_it:
code = krb_mk_req(ticket, service, phost, realm, (long)0);
- if (code)
- code += ERROR_TABLE_BASE_krb;
+ if (code) {
+ code += ERROR_TABLE_BASE_krb;
+ com_err(whoami, code, "in krb_mk_req");
+ }
+#ifdef notdef
if (pass == 1) {
/* maybe we're taking too long? */
if ((code = get_mr_tgt()) != 0) {
- /* don't need phost buffer any more */
com_err(whoami, code, " can't get Kerberos TGT");
return(code);
}
pass++;
goto try_it;
}
+#endif /* notdef */
return(code);
}
get_mr_tgt()
{
register int code;
+ char linst[INST_SZ], kinst[INST_SZ];
+
init();
- code = krb_get_svc_in_tkt(master, "", realm, "krbtgt", realm, 1, srvtab);
+ linst[0] = '\0';
+ strcpy(kinst, "krbtgt");
+ code = krb_get_svc_in_tkt(master, linst, realm, kinst, realm, 1, srvtab);
if (!code)
return(0);
else