[Mesa-dev] [PATCH 30/40] glsl: disable on disk shader cache when running as another user

Timothy Arceri tarceri at itsqueeze.com
Tue Feb 7 03:42:34 UTC 2017


From: Timothy Arceri <timothy.arceri at collabora.com>

---
 src/util/disk_cache.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c
index 7451b08..382ac6c 100644
--- a/src/util/disk_cache.c
+++ b/src/util/disk_cache.c
@@ -142,6 +142,10 @@ disk_cache_create(void)
    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)
-- 
2.9.3



More information about the mesa-dev mailing list