[epiphany/wip/sandbox: 18/20] Add important paths to the sandbox



commit a2b73274280efa067632ec0dfedb3fcc7a41f8fe
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Tue Jun 11 20:33:21 2019 -0500

    Add important paths to the sandbox

 embed/ephy-embed-shell.c | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c
index 81016244c..0b1b91c99 100644
--- a/embed/ephy-embed-shell.c
+++ b/embed/ephy-embed-shell.c
@@ -1202,7 +1202,16 @@ ephy_embed_shell_startup (GApplication *application)
                     shell);
 
   webkit_web_context_set_process_model (priv->web_context, 
WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES);
+
   webkit_web_context_set_sandbox_enabled (priv->web_context, TRUE);
+  webkit_web_context_add_path_to_sandbox (priv->web_context, ephy_file_tmp_dir (), TRUE);
+  webkit_web_context_add_path_to_sandbox (priv->web_context, ephy_profile_dir (), TRUE);
+  webkit_web_context_add_path_to_sandbox (priv->web_context, ephy_cache_dir (), TRUE);
+  webkit_web_context_add_path_to_sandbox (priv->web_context, ephy_config_dir (), TRUE);
+
+#if DEVELOPER_MODE
+  webkit_web_context_add_path_to_sandbox (priv->web_context, BUILD_ROOT, TRUE);
+#endif
 
   g_signal_connect_object (priv->web_context, "initialize-web-extensions",
                            G_CALLBACK (initialize_web_process_extensions),


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]