[PATCH 15/17] avc_open: mark allowed use of avc_init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: William Roberts <william.c.roberts@xxxxxxxxx>

avc_init is deprecated, however avc_open internally uses it.
Mark this deprecated use as OK. Another approach could be to
define an avc_init2 as a hidden, internal symbol and call that, but this
was seemed simpler and clear.

Signed-off-by: William Roberts <william.c.roberts@xxxxxxxxx>
---
 libselinux/src/avc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libselinux/src/avc.c b/libselinux/src/avc.c
index 5230efd2323a..7d30f0052f7c 100644
--- a/libselinux/src/avc.c
+++ b/libselinux/src/avc.c
@@ -156,8 +156,10 @@ int avc_open(struct selinux_opt *opts, unsigned nopts)
 			avc_enforcing = !!opts[nopts].value;
 			break;
 		}
-
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 	return avc_init("avc", NULL, NULL, NULL, NULL);
+#pragma GCC diagnostic pop
 }
 
 int avc_init(const char *prefix,
-- 
2.17.1




[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux