From 4e18561dd863e7affc9e5cff0ee69a6a309c1a5b Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 20 Feb 2014 15:46:14 -0800 Subject: [PATCH] GenCode - Ensure separate temp dirs on multi-user system --- CRM/Core/CodeGen/Util/File.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CRM/Core/CodeGen/Util/File.php b/CRM/Core/CodeGen/Util/File.php index cb5f4f2c2d..81ee570ef5 100644 --- a/CRM/Core/CodeGen/Util/File.php +++ b/CRM/Core/CodeGen/Util/File.php @@ -23,6 +23,9 @@ class CRM_Core_CodeGen_Util_File { } $newTempDir = $tempDir . '/' . $prefix . rand(1, 10000); + if (function_exists('posix_geteuid')) { + $newTempDir .= '_' . posix_geteuid(); + } if (file_exists($newTempDir)) { self::removeDir($newTempDir); -- 2.25.1