From 8403940eafd65042f05c3dd0c51a103d97139571 Mon Sep 17 00:00:00 2001
From: "petermayo@chromium.org"
 <petermayo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Sun, 5 Dec 2010 17:49:46 +0000
Subject: [PATCH] Adding SSL mutex specification to a local file, to stop
 relying on a mutable directory in the root.

TEST=Locally on a bot like machine (no prior fix). Try bots (with chmod /var/run).
BUG=none

Review URL: http://codereview.chromium.org/5617004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68312 0039d316-1c4b-4281-b951-d872f2087c98
---
 tools/python/google/platform_utils_linux.py | 2 ++
 tools/python/google/platform_utils_mac.py   | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/tools/python/google/platform_utils_linux.py b/tools/python/google/platform_utils_linux.py
index a735111c57540..db47dc2c904d0 100644
--- a/tools/python/google/platform_utils_linux.py
+++ b/tools/python/google/platform_utils_linux.py
@@ -90,6 +90,7 @@ class PlatformUtility(object):
       "server_root": os.path.join(self._UnixRoot(), "usr"),
       "mime_types_path": mime_types_path,
       "output_dir": output_dir,
+      "ssl_mutex": "file:"+os.path.join(output_dir, "ssl_mutex"),
       "user": os.environ.get("USER", "#%d" % os.geteuid()),
       "lock_file": os.path.join(output_dir, "accept.lock"),
     }
@@ -112,6 +113,7 @@ class PlatformUtility(object):
       ' -C \'ServerRoot "%(server_root)s"\''
       ' -c \'LockFile "%(lock_file)s"\''
       ' -c \'SSLCertificateFile "%(ssl_certificate_file)s"\''
+      ' -c \'SSLMutex "%(ssl_mutex)s"\''
     )
 
     if document_root:
diff --git a/tools/python/google/platform_utils_mac.py b/tools/python/google/platform_utils_mac.py
index c4399b3bf8361..6603a4149cc6e 100644
--- a/tools/python/google/platform_utils_mac.py
+++ b/tools/python/google/platform_utils_mac.py
@@ -90,6 +90,7 @@ class PlatformUtility(object):
       "server_root": os.path.join(self._UnixRoot(), "usr"),
       "mime_types_path": mime_types_path,
       "output_dir": output_dir,
+      "ssl_mutex": "file:"+os.path.join(output_dir, "ssl_mutex"),
       "user": os.environ.get("USER", "#%d" % os.geteuid()),
       "lock_file": os.path.join(output_dir, "accept.lock"),
     }
@@ -112,6 +113,7 @@ class PlatformUtility(object):
       ' -C \'ServerRoot "%(server_root)s"\''
       ' -c \'LockFile "%(lock_file)s"\''
       ' -c \'SSLCertificateFile "%(ssl_certificate_file)s"\''
+      ' -c \'SSLMutex "%(ssl_mutex)s"\''
     )
 
     if document_root:
-- 
GitLab