Date: Wed, 1 Nov 1995 05:56:58 +0800 (WST) From: Peter Wemm <peter@jhome.DIALix.COM> To: CVS-commiters@freefall.freebsd.org, cvs-sys@freefall.freebsd.org Subject: Re: cvs commit: src/sys/i386/isa isa.c Message-ID: <Pine.BSF.3.91.951101054423.22432L-100000@jhome.DIALix.COM> In-Reply-To: <199510312104.NAA23398@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 31 Oct 1995, Peter Wemm wrote:
> tweten 95/10/31 13:03:59 (tweten/633/peter)
OK.. Anybody got any idea why "getlogin" is failing on the tail end of a
rsh?
sub build_header {
local($version) = @_;
local($header);
delete $ENV{'TZ'};
local($sec,$min,$hour,$mday,$mon,$year) = localtime(time);
$version = '';
$login = getlogin || (getpwuid($<))[0] || die("Unknown user $<.\n");
^^^^^^^^
$header = sprintf("%-8s %s %02d/%02d/%02d %02d:%02d:%02d (%s/%d/%s)",
$login, $version, $year%100, $mon+1, $mday,
$hour, $min, $sec, getlogin, $<, (getpwuid($<))[0]);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
}
Since freefall isn't sharing uid's, I'd like to remove the getlogin as a
defensive measure.
I still want to know why it's possible for me to run a non-setuid program
on the end of a rsh, and that non-setuid program somehow gets a different
name from it's getlogin() system call. There has got to be a kernel bug
there somewhere.. (I've seen similar things happen with XFree86's xdm).
-Peter
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.951101054423.22432L-100000>
