From 203dcf882867e9fbe6614a701e978f2d0d152879 Mon Sep 17 00:00:00 2001 From: Heeyong Song Date: Tue, 14 Jul 2015 16:11:48 +0900 Subject: [PATCH] Remove write access to indicator shared memory Change-Id: Idad9feae61aab3a3674784b76d719604ca0f0d4c --- adaptors/common/shared-file.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adaptors/common/shared-file.cpp b/adaptors/common/shared-file.cpp index 9504246..c62a663 100644 --- a/adaptors/common/shared-file.cpp +++ b/adaptors/common/shared-file.cpp @@ -97,14 +97,14 @@ bool SharedFile::OpenFile(const char* filename, int size, bool isSystem) mode |= S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH; } - mFileDescriptor = shm_open( filename, O_RDWR, mode ); + mFileDescriptor = shm_open( filename, O_RDONLY, mode ); if( mFileDescriptor >= 0 ) { mFilename = filename; mSize = size; - mAddress = mmap( NULL, mSize, PROT_READ | PROT_WRITE, MAP_SHARED, mFileDescriptor, 0 ); + mAddress = mmap( NULL, mSize, PROT_READ, MAP_SHARED, mFileDescriptor, 0 ); if( mAddress != MAP_FAILED ) { -- 2.7.4