Commit fa41a73c authored by Wez's avatar Wez Committed by Commit Bot

[Fuchsia] Use fdio_service_connect_at() instead of fdio_open_at().

fdio_service_connect_at() is equivalent to a fdio_open_at() call with
the correct flags set to allow sub-directories to be opened under the
new hierarchical directory permission model.

TBR=sergeyu

Bug: 947802
Change-Id: If5a1e62d3e1e1db8c5246b6eacd4284f63db5507
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1544804Reviewed-by: default avatarWez <wez@chromium.org>
Commit-Queue: Wez <wez@chromium.org>
Auto-Submit: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#646116}
parent 4da04189
......@@ -24,8 +24,9 @@ ServiceDirectoryTestBase::ServiceDirectoryTestBase() {
// Create the ServiceDirectoryClient, connected to the "public" sub-directory.
fidl::InterfaceHandle<::fuchsia::io::Directory> public_directory;
CHECK_EQ(fdio_open_at(directory.channel().get(), "public", 0,
public_directory.NewRequest().TakeChannel().release()),
CHECK_EQ(fdio_service_connect_at(
directory.channel().get(), "/public/.",
public_directory.NewRequest().TakeChannel().release()),
ZX_OK);
public_service_directory_client_ =
std::make_unique<ServiceDirectoryClient>(std::move(public_directory));
......
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