home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / wizards / 4570 < prev    next >
Encoding:
Internet Message Format  |  1992-11-09  |  1.2 KB

  1. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!spool.mu.edu!umn.edu!csus.edu!nic.csu.net!gd!oleg
  2. Newsgroups: comp.unix.wizards
  3. Subject: Re: Detecting if running under chroot
  4. Message-ID: <1992Nov9.015748.3106@nic.csu.net>
  5. From: oleg@gd.bu.edu (Oleg Kibirev)
  6. Date: 9 Nov 92 01:57:47 PST
  7. References: <1992Nov3.183208.20956@newsgate.sps.mot.com> <mark.721121538@coombs>
  8. Organization: Computer Science Departement of California State University in Fresno
  9. Nntp-Posting-Host: gd.cs.csufresno.edu
  10. Lines: 22
  11.  
  12. In article <mark.721121538@coombs> mark@coombs.anu.edu.au (Mark) writes:
  13. >
  14. >I was reading some of the security texts on research.att.com and it mentioned
  15. >that it was possible to detect if one was running under a chroot call.
  16. >
  17. >If the file system is duplicated etc how would you check? Make a massive file
  18. >on the (apparent) root disk (/tmp for instance) and do a 'df' to make sure
  19. >it's the root disk?
  20.  
  21. What about checking i-node number of / ? Just checked a few systems and it appears
  22. to be the same:
  23.  
  24. gd:~> ls -di /
  25.      2 //
  26.  
  27. Of course, this  can miserably fail with  NFS where root  is  actually
  28. /export/root. What is actually checked is weather current root == root
  29. of *some*  filesystem. Why would   program need to   check if  it runs
  30. chrooted?
  31.  
  32. Oleg
  33.  
  34.