]> git.proxmox.com Git - pve-storage.git/commitdiff
scan cifs: fix passing "no pass" parameter
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 1 Jul 2020 10:17:02 +0000 (12:17 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 1 Jul 2020 10:17:02 +0000 (12:17 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/Storage.pm

index e04f2ac4343c8b7aadeb21ca21ee25a5459fc7f5..44ab62686e3fea521d3c7b04e7a5954f6766852e 100755 (executable)
@@ -1196,9 +1196,9 @@ sub scan_cifs {
 
     # we only support Windows 2012 and newer, so just use smb3
     my $cmd = ['/usr/bin/smbclient', '-m', 'smb3', '-d', '0', '-L', $server];
-    push @$cmd, '-N' if !defined($user);
     push @$cmd, '-W', $domain if defined($domain);
 
+    push @$cmd, '-N' if !defined($password);
     local $ENV{USER} = $user if defined($user);
     local $ENV{PASSWD} = $password if defined($password);