From owner-freebsd-bugs Tue Mar 17 07:07:24 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA25879 for freebsd-bugs-outgoing; Tue, 17 Mar 1998 07:07:24 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from hades.dcs.napier.ac.uk ([146.176.161.1]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA25741 for ; Tue, 17 Mar 1998 07:06:28 -0800 (PST) (envelope-from bsc4093@hades.dcs.napier.ac.uk) Received: from artemis.dcs.napier.ac.uk (artemis [146.176.161.5]) by hades.dcs.napier.ac.uk (8.7.3/8.7.3) with ESMTP id PAA04079 for ; Tue, 17 Mar 1998 15:00:32 GMT Received: (from bsc4093@localhost) by artemis.dcs.napier.ac.uk (8.7.3/8.7.3) id PAA02883; Tue, 17 Mar 1998 15:00:32 GMT Date: Tue, 17 Mar 1998 15:00:23 +0000 (GMT) From: Robin Carey To: freebsd-bugs@FreeBSD.ORG Subject: rlogind Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi, heres a couple of things I noticed the other day - Sorry for no send-pr. This is relative to: FreeBSD-stable/src/libexec/rlogind/rlogind.c of todays date. line 203: "char line[MAXPATHLEN];" should surely be: "char line[MAXPATHLEN+1];" to allow space for terminating NUL. doit(): line 314 (just after the forkpty() -- in the childs portion of code): Should there not be a "closelog()" before execl(3), as is the case for telnetd(8) ? doit(): line 306 (just after the forkpty()): I would have thought that the resgistration of the "cleanup" handler for SIGCHLD (done on line 352) should have come BEFORE the forkpty() on line 306. However if there is some reason for it to come after the forkpty() that I don't know about, surely it would make more sense to do this earlier than on line 352 ? local_domain(): line 758: "char localhost[MAXHOSTNAMELEN];" should surely be: "char localhost[MAXHOSTNAMELEN+1];", to allow space for terminating NUL. And if you're feeling really Keen, you could always update the bcopy(3) on line 377 to memcpy(3), and replace those 1's and 0's in the various calls to exit(3) with EXIT_FAILURE and EXIT_SUCCESS, respectively :) Cheers, Rob C To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message