]> git.ipfire.org Git - thirdparty/systemd.git/commit
install: don't enter loop when traversing a template symlinks
authorLennart Poettering <lennart@poettering.net>
Tue, 7 Feb 2017 15:22:49 +0000 (16:22 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 7 Feb 2017 15:22:49 +0000 (16:22 +0100)
commit9f6cbcf53cd3abe416b9808bbfb5648c6b808400
tree5fa198f67ded05065ac5bb2101a624bcb4e7b60a
parentd52fbaa58c6b0c928d1d9a2d015edcc63acb0df6
install: don't enter loop when traversing a template symlinks

Before this patch, if we'd encounter an instance or template symlink
while traversing a chain of symlinks we'd fill in the instance name and
retry the iteration. This makes no sense if the resulting name is
actually the same as we are coming from, as we'd just spin a couple of
times in the loop, until the UNIT_FILE_FOLLOW_SYMLINK_MAX iteration
limit is hit.

Fix this, by accepted the symlink as it is, if it identical to what we
filled in.
src/shared/install.c