scan_cifs: do not enforce password for users

there can be accounts with explicit null password others than the
mapped guest account.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht
2020-07-01 12:07:19 +02:00
parent afaa98f10f
commit 67a2371180

View File

@ -1198,7 +1198,6 @@ sub scan_cifs {
my $cmd = ['/usr/bin/smbclient', '-m', 'smb3', '-d', '0', '-L', $server];
push @$cmd, '-N' if !defined($user);
push @$cmd, '-W', $domain if defined($domain);
die "password is required\n" if defined($user) && !defined($password);
local $ENV{USER} = $user if defined($user);
local $ENV{PASSWD} = $password if defined($password);