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.
This commit is contained in:
@@ -225,7 +225,7 @@ int setup_machine_directory(uint64_t size, sd_bus_error *error) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (path_is_mount_point("/var/lib/machines", AT_SYMLINK_FOLLOW) > 0) {
|
||||
if (path_is_mount_point("/var/lib/machines", NULL, AT_SYMLINK_FOLLOW) > 0) {
|
||||
log_debug("/var/lib/machines is already a mount point, not creating loopback file for it.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user