From 268fa61dc1965cfc7fded3581a9e751f66e5a8e0 Mon Sep 17 00:00:00 2001 From: "Marc G. Fournier" Date: Tue, 22 Oct 1996 21:11:49 +0000 Subject: [PATCH] Fixes: When an rsh is denied by rshd because the client is lacking appropriate .rhosts permission, an error message is formatted for syslog which contains the client's hostname. The hostname portion of the message relies on a pointer to a field within gethostbyname()'s internal struct hostent which changes state between when the pointer is initialized and when it is dereferenced to create th e message. Submitted by: skynyrd@opus.cts.cwu.edu --- libexec/rshd/rshd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libexec/rshd/rshd.c b/libexec/rshd/rshd.c index 9945dde6aec..ceb186dc7a5 100644 --- a/libexec/rshd/rshd.c +++ b/libexec/rshd/rshd.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: rshd.c,v 1.8 1996/09/22 21:55:08 wosch Exp $ */ #ifndef lint @@ -363,7 +363,7 @@ doit(fromp) if (!bcmp(hp->h_addr_list[0], (caddr_t)&fromp->sin_addr, sizeof(fromp->sin_addr))) { - hostname = hp->h_name; + hostname = remotehost; break; } }