diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-09-24 12:41:30 +0200 |
---|---|---|
committer | Djalal Harouni <tixxdz@opendz.org> | 2016-09-25 10:42:18 +0200 |
commit | d944dc9553009822deaddec76814f5642a6a8176 (patch) | |
tree | 14fbda82d364e27bc2c6c86e804db2d9dde73070 /src/test/test-ns.c | |
parent | 1e4e94c8819e2fe3a7217690c0590dba8ab0be9e (diff) | |
download | systemd-d944dc9553009822deaddec76814f5642a6a8176.tar.gz systemd-d944dc9553009822deaddec76814f5642a6a8176.tar.bz2 systemd-d944dc9553009822deaddec76814f5642a6a8176.zip |
namespace: chase symlinks for mounts to set up in userspace
This adds logic to chase symlinks for all mount points that shall be created in
a namespace environment in userspace, instead of leaving this to the kernel.
This has the advantage that we can correctly handle absolute symlinks that
shall be taken relative to a specific root directory. Moreover, we can properly
handle mounts created on symlinked files or directories as we can merge their
mounts as necessary.
(This also drops the "done" flag in the namespace logic, which was never
actually working, but was supposed to permit a partial rollback of the
namespace logic, which however is only mildly useful as it wasn't clear in
which case it would or would not be able to roll back.)
Fixes: #3867
Diffstat (limited to 'src/test/test-ns.c')
-rw-r--r-- | src/test/test-ns.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/test/test-ns.c b/src/test/test-ns.c index 03a24620af..c4d4da6d05 100644 --- a/src/test/test-ns.c +++ b/src/test/test-ns.c @@ -26,14 +26,18 @@ int main(int argc, char *argv[]) { const char * const writable[] = { "/home", - "/home/lennart/projects/foobar", /* this should be masked automatically */ + "-/home/lennart/projects/foobar", /* this should be masked automatically */ NULL }; const char * const readonly[] = { - "/", - "/usr", + /* "/", */ + /* "/usr", */ "/boot", + "/lib", + "/usr/lib", + "-/lib64", + "-/usr/lib64", NULL }; |