]> git.ipfire.org Git - thirdparty/systemd.git/commit
fs-util: make chase_symlink() returns -ENOLINK when unsafe transitions are met
authorFranck Bui <fbui@suse.com>
Fri, 30 Nov 2018 14:13:44 +0000 (15:13 +0100)
committerFranck Bui <fbui@suse.com>
Mon, 10 Dec 2018 08:18:27 +0000 (09:18 +0100)
commit36c97decbe46a62b6976b8ba7c59e8552f14f935
tree908580b92efe3e57629901c8441c4d8b6c3225ee
parentfd74c6f3f83185f95dfb464db0f0a73ba69ec841
fs-util: make chase_symlink() returns -ENOLINK when unsafe transitions are met

We previously returned -EPERM but it can be returned for various other reasons
too.

Let's use -ENOLINK instead as this value shouldn't be used currently. This
allows users of CHASE_SAFE to detect without any ambiguities when unsafe
transitions are encountered by chase_symlinks().

All current users of CHASE_SAFE that explicitly reacted on -EPERM have been
converted to react on -ENOLINK.
src/basic/fs-util.c
src/core/service.c
src/test/test-fs-util.c
src/tmpfiles/tmpfiles.c