Merge pull request #10219 from briancain/SMB-PASSWORD-CHARS
Allow special characters in SMB password field
This commit is contained in:
commit
5834b1ca70
|
@ -22,7 +22,7 @@ module VagrantPlugins
|
||||||
# Ensure password is scrubbed
|
# Ensure password is scrubbed
|
||||||
Vagrant::Util::CredentialScrubber.sensitive(options[:smb_password])
|
Vagrant::Util::CredentialScrubber.sensitive(options[:smb_password])
|
||||||
end
|
end
|
||||||
machine.communicate.execute("cmdkey /add:#{options[:smb_host]} /user:#{options[:smb_username]} /pass:#{options[:smb_password]}", {shell: :powershell, elevated: true})
|
machine.communicate.execute("cmdkey /add:#{options[:smb_host]} /user:#{options[:smb_username]} /pass:\"#{options[:smb_password]}\"", {shell: :powershell, elevated: true})
|
||||||
mount_shared_folder(machine, name, guestpath, "\\\\#{options[:smb_host]}\\")
|
mount_shared_folder(machine, name, guestpath, "\\\\#{options[:smb_host]}\\")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -98,6 +98,7 @@ describe "VagrantPlugins::GuestWindows::Cap::MountSharedFolder" do
|
||||||
share_name: "name",
|
share_name: "name",
|
||||||
vm_provider_unc_path: "\\\\host\\name",
|
vm_provider_unc_path: "\\\\host\\name",
|
||||||
})
|
})
|
||||||
|
expect(machine.communicate).to receive(:execute).with("cmdkey /add:host /user:user /pass:\"pass\"", {:shell=>:powershell, :elevated=>true})
|
||||||
described_class.mount_smb_shared_folder(machine, 'name', 'guestpath', {:smb_username => "user", :smb_password => "pass", :smb_host => "host"})
|
described_class.mount_smb_shared_folder(machine, 'name', 'guestpath', {:smb_username => "user", :smb_password => "pass", :smb_host => "host"})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue