libsemanage: Use default semanage.conf as a fallback
If the private semanage.conf file is unreadable for some reason (usually ENOENT) fallback to the default file. Signed-off-by: Eric Paris <eparis@redhat.com> Acked-by: Dan Walsh <dwalsh@redhat.com>
This commit is contained in:
parent
fade75f1e2
commit
4120df1c6e
|
@ -186,7 +186,8 @@ const char *semanage_selinux_path(void) {
|
|||
|
||||
const char *semanage_conf_path(void)
|
||||
{
|
||||
if (private_semanage_conf_path)
|
||||
if (private_semanage_conf_path &&
|
||||
access(private_semanage_conf_path, R_OK) == 0)
|
||||
return private_semanage_conf_path;
|
||||
|
||||
return SEMANAGE_CONF_PATH;
|
||||
|
|
Loading…
Reference in New Issue