Jump to content




[ComputerCraft 1.2] chroot v1.0.5 - sandboxing and custom rom launching utility


7 replies to this topic

#1 Lymia Aluysia

  • Members
  • 31 posts
  • LocationHer own imagination~

Posted 28 January 2012 - 09:24 AM

This program is basically a clone of the Unix chroot program.
When you run chroot on a directory, it sets the root directory to that directory, creating a sandbox. All programs should work from inside the sandbox, and nothing inside the sandbox should be able to touch files outside of it.
To use this program, you create a chroot environment by typing in "mkroot [directory]", then enter it by typing in "chroot [directory]"

(Due to the nature of this program, it will most likely not work on future versions of ComputerCraft, and will need updating for them. The download is attached to this post. Versions before v1.0.5 can be found here.)

==Changelog==
Version v1.0:
- Initial Release
Version v1.0.1:
- Added check in bios.lua to prevent it from being run with a BIOS already running (why didn't I think of doing this last version?)
Version v1.0.2:
- Fixed mkroot for recursive chroots
- Added code in bios.lua so that rednet (hopefully) will work if started in an external system without rednet.
Version v1.0.3:
- chroot now adds http to the chroot environment if it exists. Don't ask me to do the same for luajava. That will never happen.
Version v1.0.4:
- Fixed .. in the root directory
- Fixed access to external environment by calling getfenv on external functions
- Added disk access to the chroot environment (possibly dangerous if the chroot is on a disk itself.)
Version v1.0.5:
- Dealt with the remaining known sandbox leaks.

Attached Files



#2 bik1230

    Donator

  • Moderators
  • 4 posts

Posted 10 February 2012 - 09:19 PM

0 replies.

Not anymore :D/>

#3 FuzzyPurp

    Part-Time Ninja

  • Members
  • 510 posts
  • LocationHarlem, NY

Posted 12 February 2012 - 08:46 AM

What's the latest?

#4 Mandrake Fernflower

  • Members
  • 117 posts
  • LocationDark Side of The Moon

Posted 16 February 2012 - 03:23 PM

Quick question. Where does bios.lua belong? I tried putting the mkroot and chroot programs in the /rom/programs folder
and the bios.lua in /rom. When I run makeroot it says "BIOS cannot be found"

#5 rockymc

  • Members
  • 103 posts

Posted 16 February 2012 - 03:44 PM

Bios.lua is in the same folder as rom.

#6 Mandrake Fernflower

  • Members
  • 117 posts
  • LocationDark Side of The Moon

Posted 16 February 2012 - 04:21 PM

you mean replace the BIOS with the one given?

#7 Mandrake Fernflower

  • Members
  • 117 posts
  • LocationDark Side of The Moon

Posted 16 February 2012 - 04:24 PM

Tried it did not work. :C

#8 FuzzyPurp

    Part-Time Ninja

  • Members
  • 510 posts
  • LocationHarlem, NY

Posted 28 February 2012 - 03:48 AM

Update. Now!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users