improve SFTP loop detection

This commit is contained in:
Nicola Murino
2021-04-01 18:53:48 +02:00
parent 3bfd7e4d17
commit 2f56375121
14 changed files with 353 additions and 75 deletions

View File

@@ -30,6 +30,7 @@ var (
// ErrVfsUnsupported defines the error for an unsupported VFS operation
ErrVfsUnsupported = errors.New("not supported")
credentialsDirPath string
sftpFingerprints []string
)
// SetCredentialsDirPath sets the credentials dir path
@@ -42,6 +43,11 @@ func GetCredentialsDirPath() string {
return credentialsDirPath
}
// SetSFTPFingerprints sets the SFTP host key fingerprints
func SetSFTPFingerprints(fp []string) {
sftpFingerprints = fp
}
// Fs defines the interface for filesystem backends
type Fs interface {
Name() string