summaryrefslogtreecommitdiff
path: root/dev-util/ccache/files/ccache-4.0-avoid-run-user.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util/ccache/files/ccache-4.0-avoid-run-user.patch')
-rw-r--r--dev-util/ccache/files/ccache-4.0-avoid-run-user.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/dev-util/ccache/files/ccache-4.0-avoid-run-user.patch b/dev-util/ccache/files/ccache-4.0-avoid-run-user.patch
new file mode 100644
index 000000000000..07da25c6c341
--- /dev/null
+++ b/dev-util/ccache/files/ccache-4.0-avoid-run-user.patch
@@ -0,0 +1,18 @@
+Gentoo's sandbox does not whitelist this path by default yet.
+TODO: bug link.
+
+Until we have a sandbox whitelisting the path let's rely on ccache's default.
+--- a/src/Config.cpp
++++ b/src/Config.cpp
+@@ -833,11 +833,5 @@ Config::check_key_tables_consistency()
+ std::string
+ Config::default_temporary_dir(const std::string& cache_dir)
+ {
+-#ifdef HAVE_GETEUID
+- std::string user_tmp_dir = fmt::format("/run/user/{}", geteuid());
+- if (Stat::stat(user_tmp_dir).is_directory()) {
+- return user_tmp_dir + "/ccache-tmp";
+- }
+-#endif
+ return cache_dir + "/tmp";
+ }