xf.li | 8611891 | 2025-03-19 20:07:27 -0700 | [diff] [blame^] | 1 | <!-- This configuration file controls the per-user-login-session message bus. |
| 2 | Add a session-local.conf and edit that rather than changing this |
| 3 | file directly. --> |
| 4 | |
| 5 | <!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN" |
| 6 | "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> |
| 7 | <busconfig> |
| 8 | <!-- Our well-known bus type, don't change this --> |
| 9 | <type>session</type> |
| 10 | |
| 11 | <!-- If we fork, keep the user's original umask to avoid affecting |
| 12 | the behavior of child processes. --> |
| 13 | <keep_umask/> |
| 14 | |
| 15 | <listen>unix:tmpdir=/tmp</listen> |
| 16 | |
| 17 | <!-- On Unix systems, the most secure authentication mechanism is |
| 18 | EXTERNAL, which uses credential-passing over Unix sockets. |
| 19 | |
| 20 | This authentication mechanism is not available on Windows, |
| 21 | is not suitable for use with the tcp: or nonce-tcp: transports, |
| 22 | and will not work on obscure flavours of Unix that do not have |
| 23 | a supported credentials-passing mechanism. On those platforms/transports, |
| 24 | comment out the <auth> element to allow fallback to DBUS_COOKIE_SHA1. --> |
| 25 | <auth>EXTERNAL</auth> |
| 26 | |
| 27 | <standard_session_servicedirs /> |
| 28 | |
| 29 | <policy context="default"> |
| 30 | <!-- Allow everything to be sent --> |
| 31 | <allow send_destination="*" eavesdrop="true"/> |
| 32 | <!-- Allow everything to be received --> |
| 33 | <allow eavesdrop="true"/> |
| 34 | <!-- Allow anyone to own anything --> |
| 35 | <allow own="*"/> |
| 36 | </policy> |
| 37 | |
| 38 | <!-- Include legacy configuration location --> |
| 39 | <include ignore_missing="yes">/etc/dbus-1/session.conf</include> |
| 40 | |
| 41 | <!-- Config files are placed here that among other things, |
| 42 | further restrict the above policy for specific services. --> |
| 43 | <includedir>session.d</includedir> |
| 44 | |
| 45 | <includedir>/etc/dbus-1/session.d</includedir> |
| 46 | |
| 47 | <!-- This is included last so local configuration can override what's |
| 48 | in this standard file --> |
| 49 | <include ignore_missing="yes">/etc/dbus-1/session-local.conf</include> |
| 50 | |
| 51 | <include if_selinux_enabled="yes" selinux_root_relative="yes">contexts/dbus_contexts</include> |
| 52 | |
| 53 | <!-- For the session bus, override the default relatively-low limits |
| 54 | with essentially infinite limits, since the bus is just running |
| 55 | as the user anyway, using up bus resources is not something we need |
| 56 | to worry about. In some cases, we do set the limits lower than |
| 57 | "all available memory" if exceeding the limit is almost certainly a bug, |
| 58 | having the bus enforce a limit is nicer than a huge memory leak. But the |
| 59 | intent is that these limits should never be hit. --> |
| 60 | |
| 61 | <!-- the memory limits are 1G instead of say 4G because they can't exceed 32-bit signed int max --> |
| 62 | <limit name="max_incoming_bytes">1000000000</limit> |
| 63 | <limit name="max_incoming_unix_fds">250000000</limit> |
| 64 | <limit name="max_outgoing_bytes">1000000000</limit> |
| 65 | <limit name="max_outgoing_unix_fds">250000000</limit> |
| 66 | <limit name="max_message_size">1000000000</limit> |
| 67 | <!-- We do not override max_message_unix_fds here since the in-kernel |
| 68 | limit is also relatively low --> |
| 69 | <limit name="service_start_timeout">120000</limit> |
| 70 | <limit name="auth_timeout">240000</limit> |
| 71 | <limit name="pending_fd_timeout">150000</limit> |
| 72 | <limit name="max_completed_connections">100000</limit> |
| 73 | <limit name="max_incomplete_connections">10000</limit> |
| 74 | <limit name="max_connections_per_user">100000</limit> |
| 75 | <limit name="max_pending_service_starts">10000</limit> |
| 76 | <limit name="max_names_per_connection">50000</limit> |
| 77 | <limit name="max_match_rules_per_connection">50000</limit> |
| 78 | <limit name="max_replies_per_connection">50000</limit> |
| 79 | |
| 80 | </busconfig> |