Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue36341

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:bind() on AF_UNIX socket may fail in tests run as non-root
Type:behaviorStage:resolved
Components:TestsVersions:Python 3.8
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To:Nosy List: miss-islington, xdegaye
Priority:normalKeywords:patch

Created on2019-03-18 09:28 byxdegaye, last changed2022-04-11 14:59 byadmin. This issue is nowclosed.

Pull Requests
URLStatusLinkedEdit
PR 12399mergedxdegaye,2019-03-18 09:56
Messages (2)
msg338183 -(view)Author: Xavier de Gaye (xdegaye)*(Python triager)Date: 2019-03-18 09:28
This happens on Android where a SELinux policy prevents a plain user to bind() a pathname AF_UNIX socket (abstract and unnamed sockets are not constrained by this policy).The errors are:test_asyncio:======================================================================ERROR: test_start_unix_server_1 (test.test_asyncio.test_server.SelectorStartServerTests)----------------------------------------------------------------------Traceback (most recent call last):File "/data/local/tmp/python/lib/python3.8/test/test_asyncio/test_server.py", line 105, in test_start_unix_server_1  srv = self.loop.run_until_complete(asyncio.start_unix_server(File "/data/local/tmp/python/lib/python3.8/asyncio/base_events.py", line 589, in run_until_complete  return future.result()File "/data/local/tmp/python/lib/python3.8/asyncio/streams.py", line 115, in start_unix_server  return await loop.create_unix_server(factory, path, **kwds)File "/data/local/tmp/python/lib/python3.8/asyncio/unix_events.py", line 285, in create_unix_server  sock.bind(path)PermissionError: [Errno 13] Permission deniedtest_socket:======================================================================ERROR: test_socket_fileno (test.test_socket.GeneralModuleTests)----------------------------------------------------------------------Traceback (most recent call last):File "/data/local/tmp/python/lib/python3.8/test/test_socket.py", line 1780, in test_socket_fileno  s.bind(os.path.join(tmpdir, 'socket'))PermissionError: [Errno 13] Permission deniedtest_stat:======================================================================ERROR: test_socket (test.test_stat.TestFilemodeCStat)----------------------------------------------------------------------Traceback (most recent call last):File "/data/local/tmp/python/lib/python3.8/test/test_stat.py", line 198, in test_socket  s.bind(TESTFN)PermissionError: [Errno 13] Permission denied======================================================================ERROR: test_socket (test.test_stat.TestFilemodePyStat)----------------------------------------------------------------------Traceback (most recent call last):File "/data/local/tmp/python/lib/python3.8/test/test_stat.py", line 198, in test_socket  s.bind(TESTFN)PermissionError: [Errno 13] Permission denied
msg341342 -(view)Author: miss-islington (miss-islington)Date: 2019-05-03 15:09
New changeset4461d704e23a13dfbe78ea3020e4cbeff4b68dc2 by Miss Islington (bot) (xdegaye) in branch 'master':bpo-36341: Fix tests calling bind() on AF_UNIX sockets (GH-12399)https://github.com/python/cpython/commit/4461d704e23a13dfbe78ea3020e4cbeff4b68dc2
History
DateUserActionArgs
2022-04-11 14:59:12adminsetgithub: 80522
2019-05-03 15:09:35asvetlovsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2019-05-03 15:09:20miss-islingtonsetnosy: +miss-islington
messages: +msg341342
2019-03-18 09:56:23xdegayesetkeywords: +patch
stage: needs patch -> patch review
pull_requests: +pull_request12354
2019-03-18 09:28:31xdegayecreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp