-
-
Notifications
You must be signed in to change notification settings - Fork 29.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[asyncio] bind() on a unix socket raises PermissionError on Android for a non-root user #83022
Comments
This is the same kind of issue as reported in bpo-28684. python -m test -v test_asyncio -m test_create_datagram_endpoint_existing_sock_unix Traceback (most recent call last):
File "/data/local/tmp/python/lib/python3.9/test/test_asyncio/test_base_events.py", line 1707, in t
est_create_datagram_endpoint_existing_sock_unix
sock.bind(path)
PermissionError: [Errno 13] Permission denied Ran 1 test in 0.014s FAILED (errors=1) == Tests result: FAILURE == 1 test failed: Total duration: 542 ms |
Do I understand you correctly: is Android forbids UDP Unix sockets for non-root user? |
No, it is the SELinux configuration on android devices that forbids binds to named UNIX sockets. Changing from a named UNIX socket to an unnamed UNIX socket would fix the problem. I don't know if all platforms support unnamed UNIX sockets. The fix in issue bpo-28684 (referenced in the OP) provides a new decorator to skip the test for platforms such as android. |
Please feel free to make a PR for applying @skip_unless_bind_unix_socket decorator. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: