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

Unified Diff: base/memory/shared_memory_posix.cc

Issue 2807463004: GN: aix port along with linux_s390x, linux_ppc64 and linux_ppc64le support. (Closed)
Patch Set: rebased, cleaned up the code, addressed comments Created 3 years, 8 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
Index: base/memory/shared_memory_posix.cc
diff --git a/base/memory/shared_memory_posix.cc b/base/memory/shared_memory_posix.cc
index bf29e9f02a1ec5f188ef0f4ff10e12c037835bee..0cd0a4940bf1c32c856c8f56e3566a65521d2ff3 100644
--- a/base/memory/shared_memory_posix.cc
+++ b/base/memory/shared_memory_posix.cc
@@ -157,9 +157,14 @@ bool SharedMemory::Create(const SharedMemoryCreateOptions& options) {
// the file is checked below.
// - Attackers could plant a symbolic link so that an unexpected file
// is opened, so O_NOFOLLOW is passed to open().
+#if !defined(OS_AIX)
fd = HANDLE_EINTR(
open(path.value().c_str(), O_RDWR | O_APPEND | O_NOFOLLOW));
-
+#else
+ // AIX has no 64-bit support for open falgs such as -
Nico 2017/04/25 18:50:40 typo falgs
rayb 2017/04/25 22:40:17 Fixed it.
+ // O_CLOEXEC, O_NOFOLLOW and O_TTY_INIT.
+ fd = HANDLE_EINTR(open(path.value().c_str(), O_RDWR | O_APPEND));
+#endif
// Check that the current user owns the file.
// If uid != euid, then a more complex permission model is used and this
// API is not appropriate.

Powered by Google App Engine
This is Rietveld 408576698