+Sat May 13 08:59:38 1995 Ezra Peisach <epeisach@kangaroo.mit.edu>
+
+ * krshd.c (recvauth): Use krb5_auth_con_genaddrs to set the port
+ on the connection so that credential forwarding works.
+
Tue May 9 08:17:18 1995 Ezra Peisach (epeisach@kangaroo.mit.edu)
* krshd.c (main): Cast a sockaddr_in * to sockaddr * in call to
char *cp;
#ifdef KERBEROS
- krb5_address peeraddr;
krb5_error_code status;
#endif
hostname = malloc(strlen((char *)inet_ntoa(fromp->sin_addr)) + 1);
strcpy(hostname,(char *)inet_ntoa(fromp->sin_addr));
}
- peeraddr.addrtype = fromp->sin_family;
- peeraddr.length = SIZEOF_INADDR;
- peeraddr.contents = (krb5_octet *)&fromp->sin_addr;
-
#ifdef KERBEROS
- if (status = recvauth(f, fromaddr, peeraddr)) {
+ if (status = recvauth(f, fromaddr)) {
error("Authentication failed: %s\n", error_message(status));
exit(1);
}
chars */
krb5_error_code
-recvauth(netf, peersin, peeraddr)
+recvauth(netf, peersin)
int netf;
struct sockaddr_in peersin;
- krb5_address peeraddr;
{
krb5_auth_context *auth_context = NULL;
krb5_error_code status;
if (status = krb5_auth_con_init(bsd_context, &auth_context))
return status;
- krb5_auth_con_setaddrs(bsd_context, auth_context, NULL, &peeraddr);
+ if (status = krb5_auth_con_genaddrs(bsd_context, auth_context, netf,
+ KRB5_AUTH_CONTEXT_GENERATE_REMOTE_FULL_ADDR))
+ return status;
status = krb5_compat_recvauth(bsd_context, &auth_context, &netf,
"KCMDV0.1",