mirror of
https://github.com/git-for-windows/git.git
synced 2026-03-17 22:19:19 -05:00
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>
8 lines
158 B
C
8 lines
158 B
C
#ifndef UNIX_SOCKET_H
|
|
#define UNIX_SOCKET_H
|
|
|
|
int unix_stream_connect(const char *path);
|
|
int unix_stream_listen(const char *path);
|
|
|
|
#endif /* UNIX_SOCKET_H */
|