Skip to content

Commit

Permalink
ssh: remove host name from control socket path
Browse files Browse the repository at this point in the history
This fixes an issue with long host names, as Unix socket names
must be at most ~100 characters.

By removing the host name from the path, we loose the ability
to distinguish the socket files (which was useful for cleaning
up during development), but gain the ability to backup hosts
with long DNS names.

See: https://unix.stackexchange.com/q/367008
  • Loading branch information
dmke committed Aug 17, 2021
1 parent 418cdc6 commit 2e7f1d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func newSSHMaster(host string, cfg *config.SSHConfig) *sshMaster {
user: cfg.User,
port: cfg.Port,

controlPath: filepath.Join(MountBase, ".zackup_%h_%C"),
controlPath: filepath.Join(MountBase, ".zackup_%C"),
mountPath: filepath.Join(MountBase, host),

mu: &sync.Mutex{},
Expand Down

0 comments on commit 2e7f1d8

Please sign in to comment.