Skip to content

Commit

Permalink
use symlinks for agent socket
Browse files Browse the repository at this point in the history
prevents errors when /tmp and /run/user are not on the same device
  • Loading branch information
totaam committed Dec 6, 2024
1 parent a224450 commit c8ec946
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xpra/net/ssh/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def setup_proxy_ssh_socket(
try:
os.symlink(auth_sock, agent_uuid_sockpath)
except OSError as e:
log(f"os.link({auth_sock}, {agent_uuid_sockpath})", exc_info=True)
log(f"os.symlink({auth_sock}, {agent_uuid_sockpath})", exc_info=True)
log.error("Error creating ssh agent socket symlink")
log.estr(e)
return ""
Expand Down Expand Up @@ -163,9 +163,9 @@ def setup_client_ssh_agent_socket(uuid: str, ssh_auth_sock: str) -> str:
ssh_auth_sock): # noqa: E501
try:
# ie: /run/user/1000/xpra/10/$UUID -> /tmp/ssh-XXXXvjt4hN/agent.766599
os.link(ssh_auth_sock, sockpath, follow_symlinks=False)
os.symlink(ssh_auth_sock, sockpath)
except OSError as e:
log(f"os.link({ssh_auth_sock}, {sockpath})", exc_info=True)
log(f"os.symlink({ssh_auth_sock}, {sockpath})", exc_info=True)
log.error("Error setting up ssh agent socket symlink")
log.estr(e)
sockpath = ""
Expand Down

0 comments on commit c8ec946

Please sign in to comment.