[lkml]   [2012]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 4/4] Allow unprivileged chroot when safe
    On Mon, Jan 16, 2012 at 12:15:09PM -0800, Andy Lutomirski wrote:

    > The first approach I tried was (from memory -- may not compile at all
    > on any version) fs->root.mnt != fs->root.mnt->mnt_parent. That didn't
    > work. The issue is that on dracut-based distros, AFAICT, the root (in
    > the sense of the root of the tree of struct vfsmounts) is rootfs. The
    > apparent root (the filesystem containing /, /usr, etc) is mounted on
    > top of (rootfs)/. Dracut then does something with the effect of
    > chroot("/"). So you end up with the vfsmount that contains "/" not
    > being the actual root vfsmount. But there's nothing hidden by the
    > chroot -- even if fs->root.mnt pointed at rootfs, "/" would still
    > follow the mountpoint into the actual filesystem.

    That has nothing whatsoever to do with dracut. _Everything_ ends up
    that way; IOW, everything including init(8) runs chrooted into the
    final userland root. On any normal distro. Your test is complete BS - e.g.
    mount /dev/crap /mnt/blah
    mount /dev/garbage /mnt/blah
    chroot /mnt/blah
    will *NOT* be chrooted per your definition.

     \ /
      Last update: 2012-01-16 21:29    [W:0.033 / U:13.448 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site