diff options
author | scrappy <scrappy@FreeBSD.org> | 1996-10-22 21:11:49 +0000 |
---|---|---|
committer | scrappy <scrappy@FreeBSD.org> | 1996-10-22 21:11:49 +0000 |
commit | f82957fb4d9af04b939f081d618829ca60ab77f3 (patch) | |
tree | 98262c085e892042a0ebbc84563ada7cd332b37c /libexec/rshd | |
parent | c60a33a165c15f21e7332949927393d51aaf8680 (diff) | |
download | FreeBSD-src-f82957fb4d9af04b939f081d618829ca60ab77f3.zip FreeBSD-src-f82957fb4d9af04b939f081d618829ca60ab77f3.tar.gz |
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
Diffstat (limited to 'libexec/rshd')
-rw-r--r-- | libexec/rshd/rshd.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; } } |