From: Theodore Tso Date: Fri, 30 Sep 1994 02:16:44 +0000 (+0000) Subject: Use getsockname instead of getpeername in order to get the sender address! X-Git-Tag: krb5-1.0-beta4.3~61 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3cca061cdcc1837da3fd07f0e9f24d69c7d13b17;p=krb5.git Use getsockname instead of getpeername in order to get the sender address! git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4395 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/slave/ChangeLog b/src/slave/ChangeLog index 630581b4e..967ef492b 100644 --- a/src/slave/ChangeLog +++ b/src/slave/ChangeLog @@ -1,3 +1,8 @@ +Thu Sep 29 22:15:27 1994 Theodore Y. Ts'o (tytso@dcl) + + * kprop.c (open_connection): Use getsockname instead of + getpeername when getting the sender address. + Thu Sep 15 12:48:21 1994 Theodore Y. Ts'o (tytso@dcl) * kpropd.c (PRS): Only report errors to syslog if the debug flag diff --git a/src/slave/kprop.c b/src/slave/kprop.c index 1ce00af3d..eb2fabc77 100644 --- a/src/slave/kprop.c +++ b/src/slave/kprop.c @@ -343,10 +343,10 @@ open_connection(host, fd, Errmsg) sizeof(sin.sin_addr)); socket_length = sizeof(sin); - if (getpeername(s, (struct sockaddr *)&sin, &socket_length) < 0) { + if (getsockname(s, (struct sockaddr *)&sin, &socket_length) < 0) { retval = errno; close(s); - (void) sprintf(Errmsg, "in call to getpeername"); + (void) sprintf(Errmsg, "in call to getsockname"); return(retval); } sender_addr.addrtype = ADDRTYPE_INET;