[lkml]   [2009]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCHv2 1/5] VFS: DazukoFS, stackable-fs, file access control
    On 2009-02-12, Jan Engelhardt <> wrote:
    >>+DazukoFS is typically mounted on top of an existing directory. For example,
    >>+to stack DazukoFS on top of the /opt directory, the following mount(8)
    >>+command can be given:
    >>+# mount -t dazukofs /opt /opt
    > [...]
    >>+# mount -t dazukofs /opt /mnt
    >>+When accessing files within /mnt, you will be accessing files in /opt
    >>+(through DazukoFS). When accessing files directly in /opt, DazukoFS will not
    >>+be involved.
    > This ought to be done better in light of the problem that one
    > could issue `mount -t dazukofs /mnt /opt`
    > In kernel code, I'm thinking something like
    > static int foofs_dothis(...)
    > {
    > buf = call d_path on sb->s_root
    > call namei_lookup on buf
    > use lookup's resulting dentry as source directory
    > }
    > This assumes at least that namei_lookup will not return the new SB's
    > dentry for the given path.
    > Iff that works out somehow, the 'device' part in the mount command
    > line is practically ignored like it is for like procfs.

    If we want to forbid users from being able to do this, I think it
    would be simpler just to fail the mount if it is _not_ specified for
    direct stacking. This forces users to use a syntax that makes it very
    clear what they are doing.

    Since mounting to a different directory could cause problems, I think
    it will be good to forbid it. I will make this change for the next
    patch series.

    John Ogness

     \ /
      Last update: 2009-02-13 20:37    [W:0.020 / U:9.220 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site