On Fri, 4 Apr 1997, Stefan Berg wrote:
> Hi,
>
> is there such a thing as a change root telnet daemon
> for solaris 2.4.x or 2.5.x?
>
> Might be a stupid question, but I am in need of one..
>
Some possibilities I can think of:
- do a chroot wrapper, like:
main(){chroot("/some/where");system("/real/telnetd");}
and use it instead of your original telnetd.
- there is a free chroot utility somewhere (seems it came from 4.4BSD-Lite)
just found on my linux box. I guess it does basically the same thing.
CHROOT(8) UNIX System Manager's Manual
NAME
chroot - change root directory
SYNOPSIS
chroot newroot [command]
DESCRIPTION
The chroot command changes its root directory to the supplied directory
newroot and exec's command, if supplied, or an interactive copy of your
shell.
-grab the source of some free telnetd, and insert a chroot somewhere in the
beginning.
DISCLAIMER: I haven't tried any of them, just done a quick lookup.
QUESTION: Is it safe to use system() with fixed string, or is it also
harmful?
---
GNU GPL: csak tiszta forrásból
References:
|
|