File tree Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,10 @@ Open your command palette and type in `SSHubl` to select `Connect to server`. On
6767 // Custom path to `umount` program (`fusermount` on Linux)
6868 // /!\ This setting requires plugin reload (or Sublime restart)
6969 " umount_path" : null ,
70+ // Custom path to OpenSSH control sockets directory
71+ // /!\ This setting requires plugin reload (or Sublime restart)
72+ // If you hit "path [...] too long for Unix domain socket" error, you may set this to e.g. "/tmp/sshubl"
73+ " sockets_path" : null ,
7074 // Custom options to pass to OpenSSH **master** (e.g. useful for bastion traversal)
7175 " ssh_options" : {
7276 // "ConnectTimeout": 30,
Original file line number Diff line number Diff line change 33 "ssh_path" : null ,
44 "sshfs_path" : null ,
55 "umount_path" : null ,
6+ "sockets_path" : null ,
67 "ssh_options" : {},
78 "ssh_server_alive_interval" : 15 ,
89 "ssh_login_timeout" : 10 ,
Original file line number Diff line number Diff line change 22
33import sublime
44
5+
6+ def _settings ():
7+ return sublime .load_settings ("SSHubl.sublime-settings" )
8+
9+
510cache_path = Path (sublime .cache_path ()) / "SSHubl"
611cache_path .mkdir (parents = True , exist_ok = True )
712
8- sockets_path = cache_path / "sockets"
13+ # OpenSSH binds a temporary UNIX domain socket which is 17 bytes longer than the provided path [1].
14+ # Depending on platform and username, such a path may not fit in kernel pre-allocated space [2]. So
15+ # let's allow users to define their own SSHubl control sockets directory location.
16+ # [1] : <https://github.com/openssh/openssh-portable/blob/5e4bfe6/mux.c#L1285-L1303>
17+ # [2] : <https://unix.stackexchange.com/a/367012>
18+ _sockets_path = _settings ().get ("sockets_path" )
19+ if _sockets_path is not None :
20+ sockets_path = Path (_sockets_path )
21+ else :
22+ sockets_path = cache_path / "sockets"
923sockets_path .mkdir (mode = 0o750 , exist_ok = True )
1024
1125mounts_path = cache_path / "mounts"
You can’t perform that action at this time.
0 commit comments