From b27da68320ba004e9a0f490707b86ef01af2c669 Mon Sep 17 00:00:00 2001 From: Fiona Ebner Date: Mon, 26 Jun 2023 12:58:31 +0200 Subject: [PATCH] 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 --- src/PVE/Storage/CIFSPlugin.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/Storage/CIFSPlugin.pm b/src/PVE/Storage/CIFSPlugin.pm index 71b85aa..4cab2e1 100644 --- a/src/PVE/Storage/CIFSPlugin.pm +++ b/src/PVE/Storage/CIFSPlugin.pm @@ -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'; } -- 2.39.2