From 02f43ab4a82d00775e7a885a982c387436dce32b Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Tue, 6 Jul 2021 07:50:06 +0200 Subject: [PATCH] cifs: fix sensitive parameter name for on-update/add Signed-off-by: Thomas Lamprecht --- PVE/Storage/CIFSPlugin.pm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/PVE/Storage/CIFSPlugin.pm b/PVE/Storage/CIFSPlugin.pm index 9d69b01..070ab82 100644 --- a/PVE/Storage/CIFSPlugin.pm +++ b/PVE/Storage/CIFSPlugin.pm @@ -155,10 +155,10 @@ sub check_config { # Storage implementation sub on_add_hook { - my ($class, $storeid, $scfg, %param) = @_; + my ($class, $storeid, $scfg, %sensitive) = @_; - if (defined($param{password})) { - cifs_set_credentials($param{password}, $storeid); + if (defined($sensitive{password})) { + cifs_set_credentials($sensitive{password}, $storeid); if (!exists($scfg->{username})) { warn "ignoring password parameter\n"; } @@ -170,12 +170,12 @@ sub on_add_hook { } sub on_update_hook { - my ($class, $storeid, $scfg, %param) = @_; + my ($class, $storeid, $scfg, %sensitive) = @_; - return if !exists($param{password}); + return if !exists($sensitive{password}); - if (defined($param{password})) { - cifs_set_credentials($param{password}, $storeid); + if (defined($sensitive{password})) { + cifs_set_credentials($sensitive{password}, $storeid); if (!exists($scfg->{username})) { warn "ignoring password parameter\n"; } -- 2.39.2