5 /* (c) Copyright 1988 by the Massachusetts Institute of Technology. */
6 /* For copying and distribution information, please see the file */
7 /* <mit-copyright.h>. */
10 static char *rcsid_ticket_c = "$Header$";
13 #include <mit-copyright.h>
16 #include <sys/types.h>
23 /* too bad we can't set the pathname easily */
24 static char *srvtab = KEYFILE; /* default == /etc/srvtab */
25 static char realm[REALM_SZ];
26 static char master[INST_SZ] = "sms";
27 static char service[ANAME_SZ] = "rcmd";
32 static int initialized = 0;
35 if (krb_get_lrealm(realm, 1))
36 strcpy(realm, KRB_REALM);
37 initialize_krb_error_table();
44 get_mr_update_ticket(host, ticket)
54 strcpy(phost, krb_get_phost(host));
56 code = krb_mk_req(ticket, service, phost, realm, (long)0);
58 code += ERROR_TABLE_BASE_krb;
59 com_err(whoami, code, "in krb_mk_req");
63 /* maybe we're taking too long? */
64 if ((code = get_mr_tgt()) != 0) {
65 com_err(whoami, code, " can't get Kerberos TGT");
79 char linst[INST_SZ], kinst[INST_SZ];
83 strcpy(kinst, "krbtgt");
84 code = krb_get_svc_in_tkt(master, linst, realm, kinst, realm, 1, srvtab);
88 return(code + ERROR_TABLE_BASE_krb);