mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-24 15:02:44 +00:00
libselinux: set an appropriate errno in booleans.c
Fixes: $ mkdir booleans $ sudo mount --bind ./booleans /sys/fs/selinux/booleans $ sudo getsebool -a getsebool: Unable to get boolean names: Success Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
This commit is contained in:
parent
474a09233c
commit
5689d82a44
@ -55,6 +55,7 @@ int security_get_boolean_names(char ***names, int *len)
|
||||
snprintf(path, sizeof path, "%s%s", selinux_mnt, SELINUX_BOOL_DIR);
|
||||
*len = scandir(path, &namelist, &filename_select, alphasort);
|
||||
if (*len <= 0) {
|
||||
errno = ENOENT;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user