selinux.c:reset_selinux_file_context(): do not fail in permissive mode
Return 0 on setfscreatecon(3) failure, like set_selinux_file_context(). Signed-off-by: Christian Göttsche <cgzones@googlemail.com> Acked-by: James Carter <jwcart2@gmail.com>
This commit is contained in:
parent
95fd179683
commit
e367d111e5
@ -94,7 +94,7 @@ int reset_selinux_file_context (void)
|
|||||||
}
|
}
|
||||||
if (selinux_enabled) {
|
if (selinux_enabled) {
|
||||||
if (setfscreatecon_raw (NULL) != 0) {
|
if (setfscreatecon_raw (NULL) != 0) {
|
||||||
return 1;
|
return security_getenforce () != 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user