From 62c90492ef2dd27a4d692f767c75afa28928d71b Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Sat, 30 Apr 2016 15:26:43 +1000 Subject: [PATCH] glsl: disable on disk shader cache when running as another user MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Nicolai Hähnle --- 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 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) -- 2.30.2