mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
chase-symlinks: don't insist on absolute paths if CHASE_PREFIX_ROOT is set
There's little reason to require this, given that we can just say that
if a relative path is specified it is to be read relative to the root.
This fixes a bootctl bug introduced by
3730dc5d5b which didn't bother prefixing
paths as necessary.
This commit is contained in:
@@ -84,10 +84,6 @@ int chase_symlinks(
|
||||
if (isempty(path))
|
||||
return -EINVAL;
|
||||
|
||||
/* We don't support relative paths in combination with a root directory */
|
||||
if (FLAGS_SET(flags, CHASE_PREFIX_ROOT) && !path_is_absolute(path))
|
||||
return -EINVAL;
|
||||
|
||||
/* This is a lot like canonicalize_file_name(), but takes an additional "root" parameter, that allows following
|
||||
* symlinks relative to a root directory, instead of the root of the host.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user