]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/namespace.c
namespace: chase symlinks for mounts to set up in userspace
authorLennart Poettering <lennart@poettering.net>
Sat, 24 Sep 2016 10:41:30 +0000 (12:41 +0200)
committerDjalal Harouni <tixxdz@opendz.org>
Sun, 25 Sep 2016 08:42:18 +0000 (10:42 +0200)
commitd944dc9553009822deaddec76814f5642a6a8176
tree14fbda82d364e27bc2c6c86e804db2d9dde73070
parent1e4e94c8819e2fe3a7217690c0590dba8ab0be9e
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
src/basic/fs-util.c
src/basic/fs-util.h
src/core/namespace.c
src/test/test-fs-util.c
src/test/test-ns.c