forked from goodboy/tractor
1
0
Fork 0

Add null byte guard from mainline

py3.9
Tyler Goodlet 2020-12-23 12:57:05 -05:00
parent 02ac20a43c
commit b040cdc0c9
1 changed files with 2 additions and 1 deletions

View File

@ -120,7 +120,8 @@ class PatchedForkServer(ForkServer):
with socket.socket(socket.AF_UNIX) as listener: with socket.socket(socket.AF_UNIX) as listener:
address = connection.arbitrary_address('AF_UNIX') address = connection.arbitrary_address('AF_UNIX')
listener.bind(address) listener.bind(address)
os.chmod(address, 0o600) if not util.is_abstract_socket_namespace(address):
os.chmod(address, 0o600)
listener.listen() listener.listen()
# all client processes own the write end of the "alive" pipe; # all client processes own the write end of the "alive" pipe;