From 73ffe59d87864d61b9d22f199fc6375840bf39bb Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 2 Nov 2004 20:27:48 +0000 Subject: 2004-11-02 Colin Walters * bus/selinux.c (bus_selinux_init): Split into two functions, bus_selinux_pre_init and bus_selinux_post_init. (bus_selinux_pre_init): Just determine whether SELinux is enabled. (bus_selinux_post_init): Do everything else. * bus/main.c (main): Call bus_selinux_pre_init before parsing config file, and bus_selinux_post_init after. This ensures that we don't lose the policyreload notification thread that bus_selinux_init created before forking previously. * bus/test-main.c (test_pre_hook): Update for split. --- bus/test-main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bus/test-main.c') diff --git a/bus/test-main.c b/bus/test-main.c index 4043f6ed..14e35f5f 100644 --- a/bus/test-main.c +++ b/bus/test-main.c @@ -56,7 +56,9 @@ static void test_pre_hook (void) { - if (_dbus_getenv ("DBUS_TEST_SELINUX") && !bus_selinux_init ()) + if (_dbus_getenv ("DBUS_TEST_SELINUX") + && !bus_selinux_pre_init () + && !bus_selinux_full_init ()) die ("could not init selinux support"); } -- cgit