5
0
mirror of git://git.proxmox.com/git/pve-storage.git synced 2024-12-22 13:34:16 +03:00

cifs: fix check connection call

by not having -W eat the next argument when $scfg->{domain} is defined
but empty.

As reported in the community forum [0], this could lead to issues
adding a storage in the UI.

[0]: https://forum.proxmox.com/threads/44983/post-566842

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
Fiona Ebner 2023-06-26 12:58:31 +02:00 committed by Thomas Lamprecht
parent 238d9b9aff
commit b27da68320

View File

@ -272,7 +272,7 @@ sub check_connection {
if (my $cred_file = get_cred_file($storeid)) {
push @$cmd, '-U', $scfg->{username}, '-A', $cred_file;
push @$cmd, '-W', $scfg->{domain} if defined($scfg->{domain});
push @$cmd, '-W', $scfg->{domain} if $scfg->{domain};
} else {
push @$cmd, '-U', 'Guest','-N';
}