mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-23 20:46:14 +01:00
settings: Prefer the keyfile backend when sandboxed
When we are in a sandboxed situation, bump the priority of the keyfile settings backend above the dconf one, so we use a keyfile inside the sandbox instead of requiring holes in the sandbox for dconf.
This commit is contained in:
parent
c63e3a4ada
commit
2854522379
@ -34,6 +34,7 @@
|
||||
#include "gsimplepermission.h"
|
||||
#include "gsettingsbackendinternal.h"
|
||||
#include "giomodule-priv.h"
|
||||
#include "gportalsupport.h"
|
||||
|
||||
|
||||
#define G_TYPE_KEYFILE_SETTINGS_BACKEND (g_keyfile_settings_backend_get_type ())
|
||||
@ -76,12 +77,18 @@ typedef struct
|
||||
GFileMonitor *dir_monitor;
|
||||
} GKeyfileSettingsBackend;
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#define EXTENSION_PRIORITY 10
|
||||
#else
|
||||
#define EXTENSION_PRIORITY (glib_should_use_portal () ? 110 : 10)
|
||||
#endif
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (GKeyfileSettingsBackend,
|
||||
g_keyfile_settings_backend,
|
||||
G_TYPE_SETTINGS_BACKEND,
|
||||
_g_io_modules_ensure_extension_points_registered ();
|
||||
g_io_extension_point_implement (G_SETTINGS_BACKEND_EXTENSION_POINT_NAME,
|
||||
g_define_type_id, "keyfile", 10))
|
||||
g_define_type_id, "keyfile", EXTENSION_PRIORITY))
|
||||
|
||||
static void
|
||||
compute_checksum (guint8 *digest,
|
||||
|
Loading…
Reference in New Issue
Block a user