From 420ef915512b8768c031c591fea39864ba5a2720 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 20 Feb 2014 15:39:01 -0800 Subject: [PATCH] GenCode - Ensure separate temp dirs on multi-user system --- xml/GenCode.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xml/GenCode.php b/xml/GenCode.php index 7690d4dfd1..c4a96a3c9d 100644 --- a/xml/GenCode.php +++ b/xml/GenCode.php @@ -55,6 +55,9 @@ class CRM_GenCode_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