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

Timothy Arceri timothy.arceri at collabora.com
Mon Oct 3 06:05:10 UTC 2016


---
 src/compiler/glsl/cache.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/compiler/glsl/cache.c b/src/compiler/glsl/cache.c
index 88c1dbb..d4945b4 100644
--- a/src/compiler/glsl/cache.c
+++ b/src/compiler/glsl/cache.c
@@ -142,6 +142,10 @@ 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.7.4



More information about the mesa-dev mailing list