Skip to content

Commit 15aacc4

Browse files
committed
Update LongestSock to "ssh.sock.1234567890123456"
Because ssh creates a temporary name with random suffix first to avoid race conditions. Signed-off-by: Jan Dubois <[email protected]>
1 parent a4abd16 commit 15aacc4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/store/filenames/filenames.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,7 @@ const (
4141
// See unix(4).
4242
//
4343
// On Linux, the full path must be less than 108 characters.
44-
const LongestSock = SerialSock
44+
//
45+
// ssh appends 16 bytes of random characters when it first creates the socket:
46+
// https://github.com/openssh/openssh-portable/blob/V_8_7_P1/mux.c#L1271-L1285
47+
const LongestSock = SSHSock + ".1234567890123456"

0 commit comments

Comments
 (0)