Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1356245

Re: Variant symlink filesystem

From David Lang <david@lang.hm>
Newsgroups linux.kernel
Subject Re: Variant symlink filesystem
Date 2016-03-11 23:50 +0100
Message-ID <rbE2B-4Im-1@gated-at.bofh.it> (permalink)
References (5 earlier) <rbBR8-38o-5@gated-at.bofh.it> <rbC0N-3ei-3@gated-at.bofh.it> <rbCka-3or-5@gated-at.bofh.it> <rbDgf-48r-49@gated-at.bofh.it> <rbDpT-4rR-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat, 12 Mar 2016, Cole wrote:

> On 11 March 2016 at 23:51, Al Viro <viro@zeniv.linux.org.uk> wrote:
>> On Fri, Mar 11, 2016 at 10:52:52PM +0200, Cole wrote:
>>
>>> The implementation doesn't necessarily have to continue to work with
>>> env variables. On FreeBSD, the variant symlinks function by using
>>> variables stored in kernel memory, and have a hierarchical lookup,
>>> starting with user defined values and terminating with global entries.
>>> I am not aware of such functionality existing on linux, but if someone
>>> could point me at something similar to that, I would much prefer to
>>> use that, as there are issues with variables that are exported or
>>> modified during process execution.
>>
>> Put your processes into a separate namespace and use mount --bind in it...
>
> This was one of the first solutions we looked at, and using various
> namespaces. However we would like to be able to have multiple terminal
> sessions open, and be able to have each session using a different
> mount point, or be able to use the other terminals mount point, i.e.
> switching the mount point to that of the other terminals. We would
> also like the shell to be able to make use of these, and use shell
> commands such as 'ls'.

you should be able to have multiple sessions using the same namespace. There is 
the lwn.net series on namespaces at https://lwn.net/Articles/531114/

from what I'm looking at, this should be possible with the right mount options. 
It's not as trivial as setting an environment variable, but if it's all 
scripted, that shouldn't matter to the user.

you would need to use the setns() call to have one session join an existing 
namespace rather than creating a new one.

now, changing namespaces does require CAP_SYS_ADMIN, so if you are not running 
things as root, you may need to create a small daemon to run as root that 
reassigns your different sessions from one ns to another.

David Lang

> When we originally looked at namespaces and containers, we could not
> find a solution to achieve the above. Is this possible using
> namespaces?
>
> Regards
> /Cole
>

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Variant symlink filesystem Cole <cole@opteqint.net> - 2016-03-11 17:30 +0100
  Re: Variant symlink filesystem "Austin S. Hemmelgarn" <ahferroin7@gmail.com> - 2016-03-11 17:50 +0100
  Re: Variant symlink filesystem Richard Weinberger <richard.weinberger@gmail.com> - 2016-03-11 21:10 +0100
    Re: Variant symlink filesystem Cole <cole@opteqint.net> - 2016-03-11 21:20 +0100
      Re: Variant symlink filesystem Richard Weinberger <richard@nod.at> - 2016-03-11 21:20 +0100
        Re: Variant symlink filesystem Richard Weinberger <richard@nod.at> - 2016-03-11 21:30 +0100
          Re: Variant symlink filesystem "Austin S. Hemmelgarn" <ahferroin7@gmail.com> - 2016-03-11 21:40 +0100
            Re: Variant symlink filesystem Cole <cole@opteqint.net> - 2016-03-11 22:00 +0100
              Re: Variant symlink filesystem Al Viro <viro@ZenIV.linux.org.uk> - 2016-03-11 23:00 +0100
                Re: Variant symlink filesystem Cole <cole@opteqint.net> - 2016-03-11 23:10 +0100
                Re: Variant symlink filesystem Al Viro <viro@ZenIV.linux.org.uk> - 2016-03-11 23:30 +0100
                Re: Variant symlink filesystem Cole <cole@opteqint.net> - 2016-03-11 23:40 +0100
                Re: Variant symlink filesystem David Lang <david@lang.hm> - 2016-03-11 23:50 +0100
                Re: Variant symlink filesystem Cole <cole@opteqint.net> - 2016-03-12 00:00 +0100
                Re: Variant symlink filesystem David Lang <david@lang.hm> - 2016-03-11 23:50 +0100
          Re: Variant symlink filesystem Cole <cole@opteqint.net> - 2016-03-11 21:40 +0100
            Re: Variant symlink filesystem Richard Weinberger <richard@nod.at> - 2016-03-11 21:40 +0100
            Re: Variant symlink filesystem David Lang <david@lang.hm> - 2016-03-11 23:40 +0100
        Re: Variant symlink filesystem Cole <cole@opteqint.net> - 2016-03-11 21:30 +0100

csiph-web