chiark / gitweb /
fs-util: change chase_symlinks() behaviour in regards to escaping the root dir
authorLennart Poettering <lennart@poettering.net>
Tue, 29 Nov 2016 14:54:42 +0000 (15:54 +0100)
committerSven Eden <yamakuzure@gmx.net>
Mon, 17 Jul 2017 15:58:35 +0000 (17:58 +0200)
commit7b987da65ad4eacb30034519653a61457b688352
treef7479cac5978a07354bb971607c335f05d6f58d5
parent5de3db0016e2a97b779abe27be5e7326ec1b78aa
fs-util: change chase_symlinks() behaviour in regards to escaping the root dir

Previously, we'd generate an EINVAL error if it is attempted to escape a root
directory with relative ".." symlinks. With this commit this is changed so that
".." from the root directory is a NOP, following the kernel's own behaviour
where /.. is equivalent to /.

As suggested by @keszybz.
src/basic/fs-util.c