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
committerSven Eden <yamakuzure@gmx.net>2017-07-05 08:50:53 +0200
commitf203e18b6f2c9c69e897ff62d8a4478dd3e059fe (patch)
tree799d5e30bc1fe995b3415055ab195d2b699bdb54 /src/basic/fs-util.h
parent6b0862dad14eedfa49119f13dfcaf572c7313669 (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 cec36978b..08d24fd9b 100644
--- a/src/basic/fs-util.h
+++ b/src/basic/fs-util.h
@@ -90,3 +90,5 @@ union inotify_event_buffer {
int inotify_add_watch_fd(int fd, int what, uint32_t mask);
#endif // 0
+
+int chase_symlinks(const char *path, const char *_root, char **ret);