git/builtin
Jeff Hostetler 77e522caae unix-socket: disallow chdir() when creating unix domain sockets
Calls to `chdir()` are dangerous in a multi-threaded context.  If
`unix_stream_listen()` or `unix_stream_connect()` is given a socket
pathname that is too long to fit in a `sockaddr_un` structure, it will
`chdir()` to the parent directory of the requested socket pathname,
create the socket using a relative pathname, and then `chdir()` back.
This is not thread-safe.

Teach `unix_sockaddr_init()` to not allow calls to `chdir()` when this
flag is set.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-03-15 14:32:51 -07:00
..
2020-09-30 12:53:47 -07:00
2021-01-06 15:10:49 -08:00
2020-07-30 19:18:06 -07:00
2021-01-06 15:10:49 -08:00
2020-08-11 18:04:11 -07:00
2021-01-06 15:10:49 -08:00
2020-10-16 12:30:45 -07:00
2020-07-30 19:18:06 -07:00
2020-11-02 13:17:39 -08:00
2021-01-06 15:10:49 -08:00
2020-03-24 15:04:43 -07:00
2021-01-06 15:10:49 -08:00
2020-08-24 14:54:30 -07:00
2019-05-13 14:22:54 +09:00
2020-04-28 10:47:10 -07:00
2020-03-24 15:04:44 -07:00
2020-05-13 12:19:18 -07:00
2020-10-27 15:09:49 -07:00
2020-07-30 19:18:06 -07:00
2020-09-02 14:39:25 -07:00
2020-11-10 13:46:27 -08:00
2021-01-06 15:10:49 -08:00
2020-04-28 10:47:10 -07:00
2020-07-30 19:18:06 -07:00
2020-08-11 18:04:11 -07:00
2019-06-19 08:19:21 -07:00