chiark / gitweb /
mount-util: accept that name_to_handle_at() might fail with EPERM (#5499)
authorLennart Poettering <lennart@poettering.net>
Wed, 1 Mar 2017 16:35:05 +0000 (17:35 +0100)
committerSven Eden <yamakuzure@gmx.net>
Mon, 17 Jul 2017 15:58:36 +0000 (17:58 +0200)
commit897fa0c6abbc3ca06bbde9ec9f53f07ae24d8eba
treeb519365f64fb0b4ab9aed898d1dfa0e27bbe6be4
parenteeb58b12cdce99bcbc654a9b89f9e7622ad3eb04
mount-util: accept that name_to_handle_at() might fail with EPERM (#5499)

Container managers frequently block name_to_handle_at(), returning
EACCES or EPERM when this is issued. Accept that, and simply fall back
to to fdinfo-based checks.

Note that we accept either EACCES or EPERM here, as container managers
can choose the error code and aren't very good on agreeing on just one.

(note that this is a non-issue with nspawn, as we permit
name_to_handle_at() there, only block open_by_handle_at(), which should
be sufficiently safe).
src/basic/mount-util.c