ssh: use special UNIX socket name

This commit is contained in:
Roman Zeyde 2016-11-04 10:36:53 +02:00
parent 47ff081525
commit 4c8fcd6714
No known key found for this signature in database
GPG Key ID: 87CAE5FA46917CBB

View File

@ -126,7 +126,7 @@ def serve(handler, sock_path=None, timeout=UNIX_SOCKET_TIMEOUT):
stderr=subprocess.STDOUT)
log.debug('local SSH version: %r', ssh_version)
if sock_path is None:
sock_path = tempfile.mktemp(prefix='ssh-agent-')
sock_path = tempfile.mktemp(prefix='trezor-ssh-agent-')
environ = {'SSH_AUTH_SOCK': sock_path, 'SSH_AGENT_PID': str(os.getpid())}
device_mutex = threading.Lock()