[pve-devel] [PATCH storage] cifs: bubble up NT_STATUS_INVALID_PARAMETER during connection check

Fiona Ebner f.ebner at proxmox.com
Tue Jun 27 09:48:49 CEST 2023


instead of claiming that the storage is not online.

Would've made the issue fixed by b27da68 ("cifs: fix check connection
call") more obvious, because (the UI passes along an empty string for
domain if not set and) the smbclient call returns that status with
> -W ''
in Bookworm.

Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
 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 4cab2e1..2184471 100644
--- a/src/PVE/Storage/CIFSPlugin.pm
+++ b/src/PVE/Storage/CIFSPlugin.pm
@@ -285,7 +285,7 @@ sub check_connection {
 
     if (my $err = $@) {
 	die "$out_str\n" if defined($out_str) &&
-	    ($out_str =~ m/NT_STATUS_(ACCESS_DENIED|LOGON_FAILURE)/);
+	    ($out_str =~ m/NT_STATUS_(ACCESS_DENIED|INVALID_PARAMETER|LOGON_FAILURE)/);
 	return 0;
     }
 
-- 
2.39.2






More information about the pve-devel mailing list