7 static char *rcsid_ticket_c = "$Header$";
12 #include <sys/types.h>
15 #include "sms_update_int.h"
19 /* too bad we can't set the pathname easily */
20 /*static char tkt_pathname[] = "/tmp/tkt:sms";*/
21 static char *srvtab = SRVTAB; /* default == /etc/srvtab */
22 static char realm[REALM_SZ];
23 static char sms[] = "sms";
25 extern char *tkt_string(), *PrincipalHostname();
26 static int initialized = 0;
28 #define init() { if (!initialized) { get_krbrlm(realm,0); initialized=1; }}
31 get_sms_update_ticket(host, ticket)
41 strcpy(phost, PrincipalHostname(host));
43 code = mk_ap_req(ticket, sms, phost, realm, (long)0);
45 /* maybe we're taking too long? */
46 if ((code = get_sms_tgt()) != 0) {
47 /* don't need phost buffer any more */
48 sprintf(phost, "%s: can't get Kerberos TGT",
56 return(krb_err_frob(code));
64 code = get_svc_in_tkt(sms, "", realm, "krbtgt", realm, 1, srvtab);
68 return(krb_err_frob(code));