platform_external_selinux/libselinux
Christian Göttsche ba9820a002 libselinux: set errno to EBADF on O_PATH emulation ENOENT failure
When the O_PATH emulation fails due to getxattr(2)/setxattr(2) failing
with ENOENT, e.g. because no procfs being available, override the errno
value to EBADF.  This avoids confusion to the caller as it would suggest
the target of the operation does not exist, which is not the case:

    setfiles: Could not set context for /:  No such file or directory

Fixes: a782abf2 ("libselinux: emulate O_PATH support in fgetfilecon/fsetfilecon")
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Acked-by: James Carter <jwcart2@gmail.com>
2022-08-09 09:51:55 -04:00
..
include libselinux: declare parameter of security_load_policy(3) const 2022-06-15 08:58:48 -04:00
man libselinux: declare parameter of security_load_policy(3) const 2022-06-15 08:58:48 -04:00
src libselinux: set errno to EBADF on O_PATH emulation ENOENT failure 2022-08-09 09:51:55 -04:00
utils libselinux/utils: print errno on failure 2022-05-16 10:31:15 -04:00
LICENSE initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
Makefile libselinux: use PCRE2 by default 2021-12-09 11:07:00 -05:00
VERSION Update VERSIONs to 3.4 for release. 2022-05-18 16:51:03 +02:00