[PATCH storage 1/1] cifs: fix connection check by surrounding echo command with quotes

shaan1337 sniper111 at gmail.com
Tue Mar 7 20:16:29 CET 2023


Signed-off-by: Shaan Nobee <sniper111 at gmail.com>
---
 PVE/Storage/CIFSPlugin.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/Storage/CIFSPlugin.pm b/PVE/Storage/CIFSPlugin.pm
index 6e20f4b..49716fe 100644
--- a/PVE/Storage/CIFSPlugin.pm
+++ b/PVE/Storage/CIFSPlugin.pm
@@ -272,7 +272,7 @@ sub check_connection {
     } else {
 	push @$cmd, '-U', 'Guest','-N';
     }
-    push @$cmd, '-c', 'echo 1 0';
+    push @$cmd, '-c', '\'echo 1 0\'';
 
     my $out_str;
     my $out = sub { $out_str .= shift };
-- 
2.17.1





More information about the pve-devel mailing list