1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-25 20:25:28 +03:00
aports/testing/anbox/input-chmod.patch
Antoine Fontaine db71e0d805 testing/anbox: fix issues
* give even more time to start, because Android is visibly quite
  long to start on a phone
* backport the input chmod patch, it unbreaks touch input on some
  devices
* ignore wayland env vars, as they aren't actually working
2020-03-10 22:05:29 -03:00

32 lines
1.2 KiB
Diff

being upstreamed here: https://github.com/anbox/anbox/pull/1381
diff --git a/src/anbox/input/device.cpp b/src/anbox/input/device.cpp
index 130ae1d..eb63ecc 100644
--- a/src/anbox/input/device.cpp
+++ b/src/anbox/input/device.cpp
@@ -38,6 +38,10 @@ std::shared_ptr<Device> Device::create(
sp->connector_ = std::make_shared<network::PublishedSocketConnector>(
path, runtime, delegate_connector);
+ // FIXME: currently creating the socket creates it with the rights of
+ // the user we're running as. As this one is mapped into the container
+ ::chmod(path.c_str(), S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
+
return sp;
}
diff --git a/src/anbox/input/manager.cpp b/src/anbox/input/manager.cpp
index eacdd8b..f5d44ea 100644
--- a/src/anbox/input/manager.cpp
+++ b/src/anbox/input/manager.cpp
@@ -26,7 +26,9 @@
namespace anbox {
namespace input {
Manager::Manager(const std::shared_ptr<Runtime> &runtime) : runtime_(runtime) {
- utils::ensure_paths({SystemConfiguration::instance().input_device_dir()});
+ const auto dir = SystemConfiguration::instance().input_device_dir();
+ utils::ensure_paths({dir});
+ ::chmod(dir.c_str(), S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
}
Manager::~Manager() {}