summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEzra Peisach <epeisach@mit.edu>1995-05-13 13:01:57 +0000
committerEzra Peisach <epeisach@mit.edu>1995-05-13 13:01:57 +0000
commit595ea55d9dab56d26717e5f1ff616aa30a436105 (patch)
tree1e7cad2ea88ae903dace197e2ece33a74e2cb13a
parent18614884fe6e988fdad08c0c2f803b67079aa9b7 (diff)
downloadkrb5-595ea55d9dab56d26717e5f1ff616aa30a436105.tar.gz
krb5-595ea55d9dab56d26717e5f1ff616aa30a436105.tar.xz
krb5-595ea55d9dab56d26717e5f1ff616aa30a436105.zip
so that credential forwarding works
recvauth: Use krb5_auth_con_genaddrs to set the port on the connection git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5812 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r--src/appl/bsd/ChangeLog5
-rw-r--r--src/appl/bsd/krshd.c14
2 files changed, 10 insertions, 9 deletions
diff --git a/src/appl/bsd/ChangeLog b/src/appl/bsd/ChangeLog
index cfb1d7252..b76b2712c 100644
--- a/src/appl/bsd/ChangeLog
+++ b/src/appl/bsd/ChangeLog
@@ -1,3 +1,8 @@
+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
diff --git a/src/appl/bsd/krshd.c b/src/appl/bsd/krshd.c
index 6d96e8283..0c542e58d 100644
--- a/src/appl/bsd/krshd.c
+++ b/src/appl/bsd/krshd.c
@@ -495,7 +495,6 @@ doit(f, fromp)
char *cp;
#ifdef KERBEROS
- krb5_address peeraddr;
krb5_error_code status;
#endif
@@ -694,13 +693,9 @@ doit(f, fromp)
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);
}
@@ -1591,10 +1586,9 @@ int default_realm(principal)
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;
@@ -1630,7 +1624,9 @@ recvauth(netf, peersin, peeraddr)
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",