glsl: disable on disk shader cache when running as another user
authorTimothy Arceri <timothy.arceri@collabora.com>
Sat, 30 Apr 2016 05:26:43 +0000 (15:26 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Fri, 17 Feb 2017 09:21:22 +0000 (20:21 +1100)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/util/disk_cache.c

index 1f4e8960e9e3341667b196366b17937a5e2f2381..6618a2471bc8f9a52b8b09c8393440a1e7bb1e5c 100644 (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)