aboutsummaryrefslogtreecommitdiffstats
path: root/src/util/disk_cache.c
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2016-04-30 15:26:43 +1000
committerTimothy Arceri <[email protected]>2017-02-17 20:21:22 +1100
commit62c90492ef2dd27a4d692f767c75afa28928d71b (patch)
tree154f35d2d688799085e8103467ff10cc02140233 /src/util/disk_cache.c
parent966ddd5d3d02974a05bfab43cfebcea4df9a41f2 (diff)
glsl: disable on disk shader cache when running as another user
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/util/disk_cache.c')
-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)