home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!sun-barr!cs.utexas.edu!uwm.edu!rpi!psinntp!psinntp!rsi!prcrs!paul
- From: paul@prcrs.prc.com (Paul Hite)
- Newsgroups: comp.unix.wizards
- Subject: Re: Detecting if running under chroot
- Message-ID: <5076@prcrs.prc.com>
- Date: 11 Nov 92 16:11:41 GMT
- References: <1992Nov3.183208.20956@newsgate.sps.mot.com> <mark.721121538@coombs>
- Organization: PRC Realty Systems, McLean, VA
- Lines: 20
-
- In article <mark.721121538@coombs>, mark@coombs.anu.edu.au (Mark) writes:
- >
- > I was reading some of the security texts on research.att.com and it mentioned
- > that it was possible to detect if one was running under a chroot call.
- >
- > If the file system is duplicated etc how would you check? Make a massive file
- > on the (apparent) root disk (/tmp for instance) and do a 'df' to make sure
- > it's the root disk?
-
- 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.
-
- Paul Hite PRC Realty Systems McLean,Va paul@prcrs.prc.com (703) 556-2243
- "We are trying to bring up an Air Traffic Control display on an X window
- terminal and there seems to be some problems." -- from comp.windows.x
-