diff options
author | Colin Walters <walters@verbum.org> | 2004-11-02 20:27:48 +0000 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2004-11-02 20:27:48 +0000 |
commit | 73ffe59d87864d61b9d22f199fc6375840bf39bb (patch) | |
tree | 2678c957ba9300cd075252562012f6f4efb6bff2 /bus/main.c | |
parent | c7417009b1fe78fdad1ea2c397ecc1e656c33799 (diff) | |
download | dbus-73ffe59d87864d61b9d22f199fc6375840bf39bb.tar.gz |
2004-11-02 Colin Walters <walters@verbum.org>
* 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.
Diffstat (limited to 'bus/main.c')
-rw-r--r-- | bus/main.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -377,9 +377,9 @@ main (int argc, char **argv) } _dbus_string_free (&pid_fd); - if (!bus_selinux_init ()) + if (!bus_selinux_pre_init ()) { - _dbus_warn ("SELinux initialization failed\n"); + _dbus_warn ("SELinux pre-initialization failed\n"); exit (1); } @@ -396,6 +396,12 @@ main (int argc, char **argv) exit (1); } + if (!bus_selinux_full_init ()) + { + _dbus_warn ("SELinux initialization failed\n"); + exit (1); + } + setup_reload_pipe (bus_context_get_loop (context)); _dbus_set_signal_handler (SIGHUP, signal_handler); |