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[] = "sms";
27 static char service[] = "rcmd";
29 extern char *tkt_string(), *PrincipalHostname();
34 static int initialized = 0;
37 if (krb_get_lrealm(realm, 1))
38 strcpy(realm, KRB_REALM);
39 initialize_krb_error_table();
46 get_mr_update_ticket(host, ticket)
56 strcpy(phost, PrincipalHostname(host));
58 code = krb_mk_req(ticket, service, phost, realm, (long)0);
60 code += ERROR_TABLE_BASE_krb;
62 /* maybe we're taking too long? */
63 if ((code = get_mr_tgt()) != 0) {
64 /* don't need phost buffer any more */
65 com_err(whoami, code, " can't get Kerberos TGT");
79 code = krb_get_svc_in_tkt(master, "", realm, "krbtgt", realm, 1, srvtab);
83 return(code + ERROR_TABLE_BASE_krb);