load-fragment: validate paths properly
authorLennart Poettering <lennart@poettering.net>
Tue, 25 May 2021 15:25:40 +0000 (17:25 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 9 Jul 2021 16:30:23 +0000 (18:30 +0200)
commit740b24c3e0f81556576a16390d7a2d7e0dc2a7e2
tree4a2be81562baf61f121c24f0be46abe422b38b45
parent57b91d1960fe0cb80ba260397a2e31d7c6b159ec
load-fragment: validate paths properly

The comment suggests we validate paths here, but we actually didn't, we
only validated filenames. Let' fix that.

(Note this still lets any kind of paths through, including those with
".." and stuff, this is not a normalization check after all)

(cherry picked from commit 108144adea838b281fe1f60dfa75542fe4c82d4b)
src/core/load-fragment.c