summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/util/disk_cache.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c
index 1f4e8960e9e..6618a2471bc 100644
--- a/src/util/disk_cache.c
+++ b/src/util/disk_cache.c
@@ -198,6 +198,10 @@ disk_cache_create(const char *gpu_name, const char *timestamp)
struct stat sb;
size_t size;
+ /* If running as a users other than the real user disable cache */
+ if (geteuid() != getuid())
+ return NULL;
+
/* A ralloc context for transient data during this invocation. */
local = ralloc_context(NULL);
if (local == NULL)