Index: chrome/common/mac/app_mode_common.mm |
diff --git a/chrome/common/mac/app_mode_common.mm b/chrome/common/mac/app_mode_common.mm |
index 317dec3b6331e32aa8ae332f02d4c4d9b74708f8..bece77bd56219b8b8536be38196dd88f88d64831 100644 |
--- a/chrome/common/mac/app_mode_common.mm |
+++ b/chrome/common/mac/app_mode_common.mm |
@@ -4,6 +4,8 @@ |
#include "chrome/common/mac/app_mode_common.h" |
+#include "base/file_util.h" |
+ |
namespace app_mode { |
const char kAppShimSocketName[] = "App Shim Socket"; |
@@ -40,4 +42,12 @@ ChromeAppModeInfo::ChromeAppModeInfo() |
ChromeAppModeInfo::~ChromeAppModeInfo() { |
} |
+void VerifySocketPermissions(const base::FilePath& socket_path) { |
+ CHECK(base::PathIsWritable(socket_path)); |
tapted
2014/01/06 07:31:28
You might want something stronger than this, but I
jackhou1
2014/01/07 05:24:36
We'll see what the security folks think. I suspect
|
+ base::FilePath socket_dir = socket_path.DirName(); |
+ int socket_dir_mode = 0; |
+ CHECK(base::GetPosixFilePermissions(socket_dir, &socket_dir_mode)); |
+ CHECK_EQ(0700, socket_dir_mode); |
+} |
+ |
} // namespace app_mode |