glsl: disable on disk shader cache when running as another user

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
Timothy Arceri 2016-04-30 15:26:43 +10:00 committed by Timothy Arceri
parent 966ddd5d3d
commit 62c90492ef
1 changed files with 4 additions and 0 deletions

View File

@ -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)