-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Matej Vasek <[email protected]>
- Loading branch information
1 parent
5ffdf75
commit 62ae60d
Showing
4 changed files
with
1,673 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
//go:build !windows | ||
// +build !windows | ||
|
||
package ssh_test | ||
|
||
import ( | ||
"errors" | ||
"net" | ||
"os" | ||
) | ||
|
||
func fixupPrivateKeyMod(path string) { | ||
err := os.Chmod(path, 0600) | ||
if err != nil { | ||
panic(err) | ||
} | ||
} | ||
|
||
func listen(addr string) (net.Listener, error) { | ||
return net.Listen("unix", addr) | ||
} | ||
|
||
func isErrClosed(err error) bool { | ||
return errors.Is(err, net.ErrClosed) | ||
} |
Oops, something went wrong.