diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-11-18 21:35:21 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-12-01 00:25:51 +0100 |
commit | e187369587b1c6a5f65a12e7ec0bf7844905d014 (patch) | |
tree | 30d7395e3ed58b073506d37d30d0c5f76aee71cf /src/core/namespace.c | |
parent | c9d5c9c0e19eea79ca0f09fe58e5c0b76b8001e2 (diff) |
tree-wide: stop using canonicalize_file_name(), use chase_symlinks() instead
Let's use chase_symlinks() everywhere, and stop using GNU
canonicalize_file_name() everywhere. For most cases this should not change
behaviour, however increase exposure of our function to get better tested. Most
importantly in a few cases (most notably nspawn) it can take the correct root
directory into account when chasing symlinks.
Diffstat (limited to 'src/core/namespace.c')
-rw-r--r-- | src/core/namespace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/namespace.c b/src/core/namespace.c index e9ad26bfc3..9954b9e97d 100644 --- a/src/core/namespace.c +++ b/src/core/namespace.c @@ -596,7 +596,7 @@ static int apply_mount( case READONLY: case READWRITE: - r = path_is_mount_point(bind_mount_path(m), 0); + r = path_is_mount_point(bind_mount_path(m), NULL, 0); if (r < 0) return log_debug_errno(r, "Failed to determine whether %s is already a mount point: %m", bind_mount_path(m)); if (r > 0) /* Nothing to do here, it is already a mount. We just later toggle the MS_RDONLY bit for the mount point if needed. */ @@ -860,7 +860,7 @@ int setup_namespace( if (root_directory) { /* Turn directory into bind mount, if it isn't one yet */ - r = path_is_mount_point(root_directory, AT_SYMLINK_FOLLOW); + r = path_is_mount_point(root_directory, NULL, AT_SYMLINK_FOLLOW); if (r < 0) goto finish; if (r == 0) { |