home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!spool.mu.edu!umn.edu!csus.edu!nic.csu.net!gd!oleg
- Newsgroups: comp.unix.wizards
- Subject: Re: Detecting if running under chroot
- Message-ID: <1992Nov9.015748.3106@nic.csu.net>
- From: oleg@gd.bu.edu (Oleg Kibirev)
- Date: 9 Nov 92 01:57:47 PST
- References: <1992Nov3.183208.20956@newsgate.sps.mot.com> <mark.721121538@coombs>
- Organization: Computer Science Departement of California State University in Fresno
- Nntp-Posting-Host: gd.cs.csufresno.edu
- Lines: 22
-
- 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?
-
- What about checking i-node number of / ? Just checked a few systems and it appears
- to be the same:
-
- gd:~> ls -di /
- 2 //
-
- Of course, this can miserably fail with NFS where root is actually
- /export/root. What is actually checked is weather current root == root
- of *some* filesystem. Why would program need to check if it runs
- chrooted?
-
- Oleg
-
-