Re: [RCF] [PATCH] unprivileged mount/umount

From: Ram (linuxram_at_us.ibm.com)
Date: 05/13/05

  • Next message: Miklos Szeredi: "Re: [RCF] [PATCH] unprivileged mount/umount"
    To: Miklos Szeredi <miklos@szeredi.hu>
    Date:	Fri, 13 May 2005 01:59:40 -0700
    
    
    

    On Fri, 2005-05-13 at 00:25, Ram wrote:
    > On Thu, 2005-05-12 at 18:10, Ram wrote:
    > > On Thu, 2005-05-12 at 11:51, Miklos Szeredi wrote:
    > > > > > I'm not sure passing directory file descriptors is the right semantic
    > > > > > we want - but at least it provides a point of explicit control (in
    > > > > > much the same way as a bind). Are you sure the clone + open("/") +
    > > > > > pass-to-parent scenario you allows the parent to traverse the child's
    > > > > > private name space through that fd?
    > > > >
    > > > > Pretty sure.
    > > >
    > > > Yup. Attached a little program that can be used to try this out. It
    > > > creates a new namespace in the child, does a bind mount (so the
    > > > namespaces can be differentiated), then sends the file descriptor of
    > > > "/" to the parent. The parent does fchdir(fd), then starts a shell.
    > >
    > >
    > > > So the result is that CWD is under the child namespace, while root is
    > > > under the initial namespace.
    > > >
    > >
    > > r u sure, this program works? Sorry if I am saying something dumb here.
    > > Correct me. When a file descriptor is sent from one process to other,
    > > arn't they referring to different files in each of the processes.
    > > fd=5 may be pointing to file 'xyz' in parent process,
    > > where as fd=5 will be pointing to 'abc' in the child process.
    > >
    > > This program did not work for me, and I was wondering if adding
    > > CLONE_FILES in clone() would help. Because that would make sure
    > > that both
    > > the processes share the same file descriptor. It did not work too.
    > >
    > > What am I understanding wrong?
    >
    > Sorry it works. I was misinterpreting the results.
    >
    > >
    > > In any case my opinion is if this program works than the hole should
    > > be closed instead of exploting it to access different namespace. I
    > > know Jamie is going to pounce at me. ;)
    >
    > a patch is due to fix the problem :)

    attached a patch that can fix the problem, if everybody agrees that its
    a problem.

    > RP
    >

    
    

    -
    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/



  • Next message: Miklos Szeredi: "Re: [RCF] [PATCH] unprivileged mount/umount"

    Relevant Pages

    • Re: BIOS overwritten during resume (was: Re: Asus L5D resume on battery power)
      ... >> and you probably need to fix those, ... I think I'll just port the Nigel's patch to x86-64. ... People were complaining that M$ turns users into beta-testers... ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] fix readahead breakage for sequential after random reads
      ... > yes I will run all my standard testsuites before we take this patch. ... I have also enclosed a patch that partially backs off Miklos's fix. ... ra->average value to max/2 when we move from readahead-off mode to ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: IA32 - 27 New warnings
      ... > | needed to confirm the patch and preferably some brave soul with Promise ... > Bart has already posted patches for this. ... I'm off looking for more resonably simple stuff to fix. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • 2.6.0-test7 byteorder.h ( as you go AGAIN! )
      ... seen many patches to attempt to fix this issue. ... Attached is my proposed patch to correct this error. ... all Linux CD-ROM application programs will use this ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: ALPS psmouse_reset on reconnect confusing Tecra M2
      ... > It's hard to believe your patch ... > can fix it, because the ALPS_DUALPOINT constant doesn't affect the ... > initalization behavior at all, only the way how TouchPoint data are ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)