67 |
|
|
68 |
h = *handle; |
h = *handle; |
69 |
|
|
70 |
//if (!(*cname)) |
if (!(*cname)) |
71 |
*cname = (char *) shishi_principal_default (h); |
*cname = (char *) shishi_principal_default (h); |
72 |
|
|
73 |
/* size of KRB5 auth message */ |
/* size of KRB5 auth message */ |
96 |
|
|
97 |
if (verbose) |
if (verbose) |
98 |
{ |
{ |
99 |
printf ("Client: %s\n", cname); |
printf ("Client: %s\n", *cname); |
100 |
printf ("Server: %s\n", sname); |
printf ("Server: %s\n", sname); |
101 |
} |
} |
102 |
|
|
109 |
strcat (tmpserver, "/"); |
strcat (tmpserver, "/"); |
110 |
strcat (tmpserver, sname); |
strcat (tmpserver, sname); |
111 |
|
|
112 |
hint.client = (char *) cname; |
hint.client = (char *) *cname; |
113 |
hint.server = (char *) tmpserver; |
hint.server = (char *) tmpserver; |
114 |
|
|
115 |
tkt = shishi_tkts_get (shishi_tkts_default (h), &hint); |
tkt = shishi_tkts_get (shishi_tkts_default (h), &hint); |
137 |
|
|
138 |
/* checksum = port: terminal name */ |
/* checksum = port: terminal name */ |
139 |
|
|
140 |
snprintf (cksumdata, 100, "%u:%s%s", ntohs(port), cmd, cname); |
snprintf (cksumdata, 100, "%u:%s%s", ntohs(port), cmd, *cname); |
141 |
|
|
142 |
/* add checksum to authenticator */ |
/* add checksum to authenticator */ |
143 |
|
|
227 |
} |
} |
228 |
|
|
229 |
int |
int |
230 |
get_auth (int infd, Shishi ** handle, Shishi_key ** enckey, const char ** err_msg, int * protoversion |
get_auth (int infd, Shishi ** handle, Shishi_key ** enckey, const char ** err_msg, int * protoversion, |
231 |
/*int * cksumtype, char * cksum, int * cksumlen*/) |
int * cksumtype, char * cksum, int * cksumlen) |
232 |
{ |
{ |
233 |
Shishi_key *key; |
Shishi_key *key; |
234 |
Shishi_ap *ap; |
Shishi_ap *ap; |
399 |
#endif |
#endif |
400 |
|
|
401 |
/* Get authenticator checksum */ |
/* Get authenticator checksum */ |
402 |
/* rc = shishi_authenticator_cksum (*handle, shishi_ap_authenticator (ap), cksumtype, cksum, cksumlen); |
rc = shishi_authenticator_cksum (*handle, shishi_ap_authenticator (ap), cksumtype, cksum, cksumlen); |
403 |
if (rc != SHISHI_OK) |
if (rc != SHISHI_OK) |
404 |
{ |
{ |
405 |
syslog (LOG_ERR, "Could not get checksum authenticator from AP-REQ: %s\n", shishi_strerror (rc)); |
syslog (LOG_ERR, "Could not get checksum authenticator from AP-REQ: %s\n", shishi_strerror (rc)); |
406 |
return 1; |
return 1; |
407 |
} |
} |
408 |
*/ |
|
409 |
|
|
410 |
/* User is authenticated. */ |
/* User is authenticated. */ |
411 |
error = 0; |
error = 0; |