From: Timothy Arceri Date: Sat, 30 Apr 2016 05:26:43 +0000 (+1000) Subject: glsl: disable on disk shader cache when running as another user X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=62c90492ef2dd27a4d692f767c75afa28928d71b;p=mesa.git glsl: disable on disk shader cache when running as another user Reviewed-by: Nicolai Hähnle --- 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)