[ssh] Complete io2 migration
Bug: 376575307
Change-Id: I7ebb9d52d9da8f5427de7633f6676a73797509ad
Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/openssh-portable/+/1195035
Commit-Queue: Brandon Castellano <bcastell@google.com>
Reviewed-by: Adam Barth <abarth@google.com>
diff --git a/fuchsia/fuchsia-compat.c b/fuchsia/fuchsia-compat.c
index a3cca93..ce61516 100644
--- a/fuchsia/fuchsia-compat.c
+++ b/fuchsia/fuchsia-compat.c
@@ -92,7 +92,7 @@
}
int boot_lib_dir;
- status = fdio_open_fd("/boot/lib", lib_dir_open_flags(), &boot_lib_dir);
+ status = fdio_open3_fd("/boot/lib", lib_dir_open_flags(), &boot_lib_dir);
if (status != ZX_OK) {
fprintf(stderr, "fatal: failed to open /boot/lib: %d\n", status);
exit(1);
diff --git a/fuchsia/loader-wrapper.cc b/fuchsia/loader-wrapper.cc
index 180e844..54f37bc 100644
--- a/fuchsia/loader-wrapper.cc
+++ b/fuchsia/loader-wrapper.cc
@@ -11,10 +11,9 @@
#include <fbl/unique_fd.h>
#include <src/lib/loader_service/loader_service.h>
-uint32_t lib_dir_open_flags() {
- return static_cast<uint32_t>(fuchsia_io::wire::OpenFlags::kRightReadable |
- fuchsia_io::wire::OpenFlags::kRightExecutable |
- fuchsia_io::wire::OpenFlags::kDirectory);
+uint64_t lib_dir_open_flags() {
+ return uint64_t{fuchsia_io::wire::kPermReadable | fuchsia_io::wire::kPermExecutable |
+ fuchsia_io::wire::Flags::kProtocolDirectory};
}
struct loader_service {
diff --git a/fuchsia/loader-wrapper.h b/fuchsia/loader-wrapper.h
index 61e26c0..2290bac 100644
--- a/fuchsia/loader-wrapper.h
+++ b/fuchsia/loader-wrapper.h
@@ -14,7 +14,7 @@
typedef struct loader_service loader_service_t;
-uint32_t lib_dir_open_flags();
+uint64_t lib_dir_open_flags();
// Create a new file-descriptor backed fuchsia.ldsvc.Loader service capable of handling any number
// of clients.