Miss Islington (bot)
65d87a2cb8
gh-94821: Fix autobind of empty unix domain address (GH-94826)
...
When binding a unix socket to an empty address on Linux, the socket is
automatically bound to an available address in the abstract namespace.
>>> s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
>>> s.bind("")
>>> s.getsockname()
b'\x0075499'
Since python 3.9, the socket is bound to the one address:
>>> s.getsockname()
b'\x00'
And trying to bind multiple sockets will fail with:
Traceback (most recent call last):
File "/home/nsoffer/src/cpython/Lib/test/test_socket.py", line 5553, in testAutobind
s2.bind("")
OSError: [Errno 98] Address already in use
Added 2 tests:
- Auto binding empty address on Linux
- Failing to bind an empty address on other platforms
Fixes f6b3a07b7df6 (bpo-44493: Add missing terminated NUL in sockaddr_un's length (GH-26866)
(cherry picked from commit c22f134211743cd5ad14cec1dd4f527bee542b4c)
Co-authored-by: Nir Soffer <nsoffer@redhat.com>
2022-07-17 08:39:22 -07:00
..
2022-03-26 20:52:24 +01:00
2022-06-24 04:17:21 -07:00
2022-05-03 21:42:14 +02:00
2022-06-22 14:29:09 +02:00
2022-07-11 05:40:02 -07:00
2022-03-26 21:36:08 +01:00
2022-07-07 16:09:05 -07:00
2022-06-17 01:43:56 -07:00
2022-05-03 20:25:41 +02:00
2022-05-03 20:25:41 +02:00
2022-06-10 11:14:25 +01:00
2022-03-07 21:46:18 +00:00
2022-02-08 13:39:07 -07:00
2022-07-11 14:17:32 +01:00
2022-05-28 11:31:06 -07:00
2022-05-03 21:42:14 +02:00
2022-05-03 21:42:14 +02:00
2022-07-07 05:03:00 -07:00
2022-05-14 07:59:52 -07:00
2022-05-03 18:27:38 +02:00
2022-05-03 21:42:14 +02:00
2022-05-03 21:42:14 +02:00
2022-02-16 18:57:28 +09:00
2022-06-22 10:47:52 +02:00
2021-10-22 15:36:28 +02:00
2022-05-04 13:30:23 +02:00
2022-04-09 09:54:54 +09:00
2022-07-05 21:02:43 +02:00
2022-03-05 01:38:56 +09:00
2021-10-25 01:25:27 -07:00
2021-12-15 15:32:32 +00:00
2022-06-22 10:47:52 +02:00
2022-07-14 09:47:17 -07:00
2022-05-05 16:22:32 -07:00
2022-02-11 17:22:11 +01:00
2022-02-11 17:22:11 +01:00
2022-07-09 09:33:15 -07:00
2022-03-02 00:38:21 +09:00
2022-06-26 03:42:41 -07:00
2022-05-03 21:42:14 +02:00
2022-04-28 16:30:28 +02:00
2022-06-20 15:47:41 +02:00
2022-05-16 18:57:42 -07:00
2022-05-03 21:42:14 +02:00
2022-05-03 21:42:14 +02:00
2022-03-17 13:05:52 +02:00
2022-04-07 12:31:01 -07:00
2021-11-24 10:20:37 +01:00
2022-03-07 18:57:45 +09:00
2022-06-10 17:09:37 +01:00
2022-06-20 15:47:41 +02:00
2022-01-15 09:52:19 +01:00
2022-03-28 04:43:45 -04:00
2022-05-03 21:42:14 +02:00
2022-04-07 12:27:35 -07:00
2022-03-20 12:28:15 -07:00
2022-02-25 01:32:57 +01:00
2022-06-20 15:47:41 +02:00
2021-12-08 23:28:51 +01:00
2022-05-27 17:56:30 -07:00
2022-06-20 05:08:14 -07:00
2021-12-03 00:08:42 +00:00
2022-04-05 02:05:36 -04:00
2022-06-20 11:37:27 -07:00
2022-02-15 09:02:21 +09:00
2022-05-06 01:34:11 +02:00
2022-06-29 16:22:41 +02:00
2022-05-03 21:42:14 +02:00
2021-10-22 15:36:28 +02:00
2022-03-02 14:15:26 +01:00
2022-05-03 21:42:14 +02:00
2022-04-20 13:46:08 +03:00
2022-03-13 23:28:45 +02:00
2022-06-06 20:09:51 +02:00
2021-11-25 12:28:41 +01:00
2022-02-07 16:21:31 +01:00
2022-06-20 15:47:41 +02:00
2022-02-05 20:52:01 +01:00
2022-03-14 14:40:28 +01:00
2021-11-20 10:18:48 +01:00
2022-04-04 10:53:26 +03:00
2022-05-31 12:53:27 -07:00
2021-10-22 15:36:28 +02:00
2021-10-22 15:36:28 +02:00
2021-10-22 15:36:28 +02:00
2022-06-20 05:08:14 -07:00
2022-07-17 08:39:22 -07:00
2022-03-11 23:25:14 +01:00
2022-04-23 14:48:17 -07:00
2022-05-03 21:42:14 +02:00
2022-05-19 08:05:52 -07:00
2022-04-15 10:44:05 +09:00
2022-06-10 13:28:48 +02:00
2022-05-03 21:42:14 +02:00
2022-06-10 13:28:48 +02:00
2022-05-03 21:42:14 +02:00
2022-03-20 12:28:15 -07:00