Re: Chroot bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Olivier Galibert wrote:
chroot does not allow you to walk out if you're in.

You're mistaken. Or more properly, further use of chroot lets you walk out. This really has been said before, and before, and before.

   chroot("subtree");   // enter chroot
   chdir("/");    // now at subtree
   chroot("/tmp");   // now outside of chroot


BSD redefined chroot so that the working directory is set to the new root on subsequent uses of chroot; that's how they solved the bug.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux