From f82957fb4d9af04b939f081d618829ca60ab77f3 Mon Sep 17 00:00:00 2001 From: scrappy Date: Tue, 22 Oct 1996 21:11:49 +0000 Subject: 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(-) (limited to 'libexec/rshd') diff --git a/libexec/rshd/rshd.c b/libexec/rshd/rshd.c index 9945dde..ceb186d 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; } } -- cgit v1.1