shared/install: fix handling of a linked unit file
When we have a symlink that goes outside of our search path, we should just ignore the target file name. But we were verifying it, and rejecting in the case where a symlink was created manually.
This commit is contained in:
@@ -1606,7 +1606,9 @@ static int install_info_traverse(
|
||||
return -ELOOP;
|
||||
}
|
||||
|
||||
r = install_info_follow(ctx, i, lp, flags, false);
|
||||
r = install_info_follow(ctx, i, lp, flags,
|
||||
/* If linked, don't look at the target name */
|
||||
/* ignore_different_name= */ i->type == UNIT_FILE_TYPE_LINKED);
|
||||
if (r == -EXDEV) {
|
||||
_cleanup_free_ char *buffer = NULL;
|
||||
const char *bn;
|
||||
|
||||
Reference in New Issue
Block a user