Commit 232122e5 authored by Jiacheng Guo's avatar Jiacheng Guo Committed by Commit Bot

Update broker socket permssion

This change allows all users in the same group to access external mojo
service.

Bug: 140592503
Test: Build and verified with external client
Change-Id: I1f82378460fd8ae002f02d09103841541b1aa788
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1808630Reviewed-by: default avatarKenneth MacKay <kmackay@chromium.org>
Commit-Queue: Jiacheng Guo <gjc@google.com>
Cr-Commit-Position: refs/heads/master@{#697467}
parent f163212c
...@@ -7,6 +7,10 @@ ...@@ -7,6 +7,10 @@
#include <map> #include <map>
#include <utility> #include <utility>
#if OS_LINUX
#include <sys/stat.h>
#endif
#include "base/bind.h" #include "base/bind.h"
#include "base/bind_helpers.h" #include "base/bind_helpers.h"
#include "base/location.h" #include "base/location.h"
...@@ -393,6 +397,11 @@ ExternalMojoBroker::ExternalMojoBroker(const std::string& broker_path) { ...@@ -393,6 +397,11 @@ ExternalMojoBroker::ExternalMojoBroker(const std::string& broker_path) {
mojo::PlatformChannelServerEndpoint server_endpoint = mojo::PlatformChannelServerEndpoint server_endpoint =
named_channel.TakeServerEndpoint(); named_channel.TakeServerEndpoint();
DCHECK(server_endpoint.is_valid()); DCHECK(server_endpoint.is_valid());
#if OS_LINUX
chmod(broker_path.c_str(), 0770);
#endif
read_watcher_ = std::make_unique<ReadWatcher>( read_watcher_ = std::make_unique<ReadWatcher>(
connector_.get(), server_endpoint.TakePlatformHandle()); connector_.get(), server_endpoint.TakePlatformHandle());
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment