]> git.ipfire.org Git - thirdparty/systemd.git/commit
shared/unit-file: add a function to validate unit alias symlinks
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 2 Apr 2019 09:22:56 +0000 (11:22 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 30 Jul 2019 11:51:21 +0000 (13:51 +0200)
commit7d1e91d1a9504ab1bc03894038f90a8e87a4e982
treeb628e7ca3ba4a24cb88cea2248b001f8b8caa700
parent54f44034852e640b4e6e89b8a9c5bd9834574de7
shared/unit-file: add a function to validate unit alias symlinks

It turns out most possible symlinks are invalid, because the type has to match,
and template units can only be linked to template units.

I'm not sure if the existing code made the same checks consistently. At least
I don't see the same rules expressed in a single place.
src/shared/unit-file.c
src/shared/unit-file.h
src/test/meson.build
src/test/test-unit-file.c [new file with mode: 0644]