1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
Forwarded: not-needed
From: Simon Josefsson <simon@josefsson.org>
Last-Update: 2025-10-12
Subject: [PATCH] tests: Put agent socket in /tmp
Modern OpenSSH move the agent socket from /tmp to the user's home
directory, however this may result in build errors like this:
client_test.go:46: /usr/bin/ssh-agent -s failed: exit status 255
ensure_mkdir: mkdir /nonexistent/.ssh: No such file or directory
main: Couldn't prepare agent socket
Moving the socket back to run self-tests seems like a simple
workaround here.
https://github.com/openssh/openssh-portable/commit/80162f9d7e7eadca4ffd0bd1c015d38cb1821ab6
diff --git a/ssh/agent/client_test.go b/ssh/agent/client_test.go
index 0fd284d..fbf3e27 100644
--- a/ssh/agent/client_test.go
+++ b/ssh/agent/client_test.go
@@ -39,7 +39,7 @@ func startOpenSSHAgent(t *testing.T) (client ExtendedAgent, socket string, clean
t.Skip("could not find ssh-agent")
}
- cmd := exec.Command(bin, "-s")
+ cmd := exec.Command(bin, "-s", "-T")
cmd.Env = []string{} // Do not let the user's environment influence ssh-agent behavior.
cmd.Stderr = new(bytes.Buffer)
out, err := cmd.Output()
|