home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usc!rpi!uwm.edu!spool.mu.edu!olivea!charnel!rat!koko.csustan.edu!nic.csu.net!gd!oleg
- From: oleg@gd. (Oleg Kibirev)
- Newsgroups: comp.unix.wizards
- Subject: Re: Detecting if running under chroot
- Message-ID: <1992Nov16.231704.3223@nic.csu.net>
- Date: 17 Nov 92 07:17:03 GMT
- References: <mark.721121538@coombs> <5076@prcrs.prc.com> <1e8lf3INN7q6@smurf.smurf.sub.org>
- Organization: Computer Science Departement of California State University in Fresno
- Lines: 22
- Nntp-Posting-Host: gd.cs.csufresno.edu
-
- In article <1e8lf3INN7q6@smurf.smurf.sub.org> urlichs@smurf.sub.org (Matthias Urlichs) writes:
- >In comp.unix.wizards, article <5076@prcrs.prc.com>,
- > paul@prcrs.prc.com (Paul Hite) writes:
- >>
- >> Well I've played around some public access bbs systems that thew me into a
- >> chroot env. From a practical standpoint, I quickly noticed how little I could
- >> do. It just had the "feel" of a chroot environment. But I guess that you're
- >> looking for a more formal method. I would examine the inode of the root. I
- >> think something like "ls -id /" should do it. But I still say that most
- >> chroot'd environments that I have seen don't really need much effort to
- >> detect.
- >>
- >Doesn't work if the chrooted environment resides on the root of another file
- >system.
- >
- >I'd say that any way to detect a chrooted environment from first principles,
- >i.e. other than finding a local news server but no newsspool, is declared
- >a bug in the OS.
- >
- Yup. Consider chroot /.
-
- Oleg
-