]> git.proxmox.com Git - pve-storage.git/commitdiff
cifs: fix sensitive parameter name for on-update/add
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 6 Jul 2021 05:50:06 +0000 (07:50 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 6 Jul 2021 05:50:06 +0000 (07:50 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/Storage/CIFSPlugin.pm

index 9d69b01f16b12697a810ba4eb8c1d1c098d74954..070ab826c1a78757a994bbe5f6196607d7f46ab4 100644 (file)
@@ -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";
        }