-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 This patch looks good to me. acked. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk/I+LoACgkQrlYvE4MpobNFVACgrHTDdbtlugdj43UZGm2n4d7l vpAAoNVhKK6Qq/uq93irq6mD77iY3cXJ =kK2b -----END PGP SIGNATURE-----
>From fd9fbe02124bcb8831e21df49ad44ac3476b1ab1 Mon Sep 17 00:00:00 2001 From: Dan Walsh <dwalsh@xxxxxxxxxx> Date: Thu, 5 Jan 2012 09:20:11 -0500 Subject: [PATCH 33/90] 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@xxxxxxxxxx> --- libsemanage/src/handle.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libsemanage/src/handle.c b/libsemanage/src/handle.c index 4b43ba7..7fcd2b4 100644 --- a/libsemanage/src/handle.c +++ b/libsemanage/src/handle.c @@ -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; -- 1.7.10.2