summaryrefslogtreecommitdiff
path: root/src/basic/fs-util.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-09-24 12:41:30 +0200
committerDjalal Harouni <tixxdz@opendz.org>2016-09-25 10:42:18 +0200
commitd944dc9553009822deaddec76814f5642a6a8176 (patch)
tree14fbda82d364e27bc2c6c86e804db2d9dde73070 /src/basic/fs-util.h
parent1e4e94c8819e2fe3a7217690c0590dba8ab0be9e (diff)
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/basic/fs-util.h')
-rw-r--r--src/basic/fs-util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h
index 2c3b9a1c74..31df47cf1e 100644
--- a/src/basic/fs-util.h
+++ b/src/basic/fs-util.h
@@ -77,3 +77,5 @@ union inotify_event_buffer {
};
int inotify_add_watch_fd(int fd, int what, uint32_t mask);
+
+int chase_symlinks(const char *path, const char *_root, char **ret);