lkml.org 
[lkml]   [2007]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: sys_chroot+sys_fchdir Fix
    Serge E. Hallyn wrote:
    > No reason for any new parameters to pivot_root. Just clone your mounts
    > namespace first.
    >
    > unshare(CLONE_NEWNS);
    > chdir(new_dir);
    > pivot_root(new_dir, oldroot);
    >
    > Since pivot_root actually fiddles with the vfsmnts, this is really the
    > only way to go about having it "work with just one process".

    I think the point is that, whereas we'd like to be able to pivot the
    root for a single process, in practice this causes startup issues to
    which the easy solution is to pivot the whole system. At least that's
    my reading of the man page.

    It might be tidy if pivot_root could be used (instead of a hack based on
    a chroot bug), but it'd still be unportable.
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-09-25 00:07    [W:4.893 / U:0.036 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site