Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Unified Diff: chrome/common/mac/app_mode_common.mm

Issue 66043003: Put app shim IPC socket in a temporary directory. (Mac) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« chrome/common/mac/app_mode_common.h ('K') | « chrome/common/mac/app_mode_common.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« chrome/common/mac/app_mode_common.h ('K') | « chrome/common/mac/app_mode_common.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698