mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-09 11:58:02 +02:00
* dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile here in the parent process, so we can return an error if it fails. Also, move some of the code into the child so the parent is less hosed if we fail midway through. * bus/bus.c (bus_context_new): move pidfile detection further up in the function, before we start overwriting sockets and such. * bus/messagebus.in: adjust this a bit, not sure if it will work. * configure.in: add --with-system-pid-file and --with-system-socket 2003-04-06 Colin Walters <walters@verbum.org> * configure.in (DBUS_SYSTEM_PID_FILE): New variable. * bus/system.conf.in: Declare a pidfile. * bus/bus.c (bus_context_new): Test for an existing pid file, and create one (if appropriate). * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New. (struct BusConfigParser) [pidfile]: New. (element_type_to_name, merge_included, start_busconfig_child) (bus_config_parser_end_element, bus_config_parser_content): Handle it. (bus_config_parser_unref): Free it. (bus_config_parser_get_pidfile): New function. * bus/config-parser.h (_dbus_write_pid_file): Prototype. * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error. * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function. * dbus/dbus-sysdeps.h: Prototype it.
42 lines
1.3 KiB
Text
42 lines
1.3 KiB
Text
<!-- This configuration file controls the systemwide message bus.
|
|
Add a system-local.conf and edit that rather than changing this
|
|
file directly. -->
|
|
|
|
<!-- Note that there are any number of ways you can hose yourself
|
|
security-wise by screwing up this file; in particular, you
|
|
probably don't want to listen on any more addresses, add any more
|
|
auth mechanisms, run as a different user, etc. -->
|
|
|
|
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
|
|
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
|
|
<busconfig>
|
|
|
|
<!-- Our well-known bus type, do not change this -->
|
|
<type>system</type>
|
|
|
|
<!-- Run as special user -->
|
|
<user>messagebus</user>
|
|
|
|
<!-- Fork into daemon mode -->
|
|
<fork/>
|
|
|
|
<!-- Write a pid file -->
|
|
<pidfile>@DBUS_SYSTEM_PID_FILE@</pidfile>
|
|
|
|
<!-- Only allow socket-credentials-based authentication -->
|
|
<auth>EXTERNAL</auth>
|
|
|
|
<!-- Only listen on a local socket -->
|
|
<listen>unix:path=@DBUS_SYSTEM_SOCKET@</listen>
|
|
|
|
<policy context="default">
|
|
<!-- Deny everything then punch holes -->
|
|
<deny send="*"/>
|
|
<deny receive="*"/>
|
|
<deny own="*"/>
|
|
</policy>
|
|
|
|
<!-- This is included last so local configuration can override what's
|
|
in this standard file -->
|
|
<include ignore_missing="yes">system-local.conf</include>
|
|
</busconfig>
|