pwmt / zathura

Document viewer
https://pwmt.org/projects/zathura
zlib License
2.05k stars 144 forks source link

Prevent DBus initialization in strict sandbox mode - [closed] #532

Closed sebastinas closed 5 months ago

sebastinas commented 1 year ago

On GitLab by @valoq on Jan 18, 2023, 12:02


Merges sandbox -> develop

Depends on #470 and !67 to be merged first

Fixes #276

In order to avoid a dbus connection when using zathura in strict sandbox mode, we need to check the sandbox configuration option before gtk_init and set the dbus session bus address to "disabled:" in order to prevent the initialization by gtk.

This solution is reliable and works across dbus implementations according to the dbus maintainer. (This solution is also currently used by chromium) https://gitlab.freedesktop.org/dbus/dbus/-/issues/429

sebastinas commented 1 year ago

On GitLab by @valoq on Jan 19, 2023, 14:11


added 1 commit

Compare with previous version

sebastinas commented 1 year ago

On GitLab by @valoq on Jan 19, 2023, 14:27


added 1 commit

Compare with previous version

sebastinas commented 1 year ago

I think this is going too far. This should be outside of zathura in a wrapper script or something.

sebastinas commented 1 year ago

On GitLab by @valoq on Sep 18, 2023, 20:11


mentioned in merge request girara!8

sebastinas commented 1 year ago

On GitLab by @valoq on Sep 18, 2023, 20:15


With !67 we could restart zathura during initialization when the sandbox option is used in the configuration file, by using the commandline option to disable the dbus socket address like upstream recommended. This works because the command line option can be interpreted before the configuration file.