From 98487a0cde158c6d055305fda8a0dd84c51422cc Mon Sep 17 00:00:00 2001 From: andyzhangx Date: Wed, 20 Sep 2017 14:14:54 +0000 Subject: [PATCH] only allow cifs mount on windows node --- pkg/util/mount/mount_windows.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/util/mount/mount_windows.go b/pkg/util/mount/mount_windows.go index c2b5fc68f26..2cb890f1b03 100644 --- a/pkg/util/mount/mount_windows.go +++ b/pkg/util/mount/mount_windows.go @@ -74,7 +74,11 @@ func (mounter *Mounter) Mount(source string, target string, fstype string, optio return nil } - // currently only SMB mount is supported + // currently only cifs mount is supported + if strings.ToLower(fstype) != "cifs" { + return fmt.Errorf("azureMount: only cifs mount is supported now, fstype: %q, mounting source (%q), target (%q), with options (%q)", fstype, source, target, options) + } + cmdLine := fmt.Sprintf(`$User = "%s";$PWord = ConvertTo-SecureString -String "%s" -AsPlainText -Force;`+ `$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $User, $PWord`, options[0], options[1])