From: Tim Otten Date: Thu, 20 Feb 2014 23:39:01 +0000 (-0800) Subject: GenCode - Ensure separate temp dirs on multi-user system X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=420ef915512b8768c031c591fea39864ba5a2720;p=civicrm-core.git GenCode - Ensure separate temp dirs on multi-user system --- 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);