cifs: fix sensitive parameter name for on-update/add
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
@ -155,10 +155,10 @@ sub check_config {
|
|||||||
# Storage implementation
|
# Storage implementation
|
||||||
|
|
||||||
sub on_add_hook {
|
sub on_add_hook {
|
||||||
my ($class, $storeid, $scfg, %param) = @_;
|
my ($class, $storeid, $scfg, %sensitive) = @_;
|
||||||
|
|
||||||
if (defined($param{password})) {
|
if (defined($sensitive{password})) {
|
||||||
cifs_set_credentials($param{password}, $storeid);
|
cifs_set_credentials($sensitive{password}, $storeid);
|
||||||
if (!exists($scfg->{username})) {
|
if (!exists($scfg->{username})) {
|
||||||
warn "ignoring password parameter\n";
|
warn "ignoring password parameter\n";
|
||||||
}
|
}
|
||||||
@ -170,12 +170,12 @@ sub on_add_hook {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub on_update_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})) {
|
if (defined($sensitive{password})) {
|
||||||
cifs_set_credentials($param{password}, $storeid);
|
cifs_set_credentials($sensitive{password}, $storeid);
|
||||||
if (!exists($scfg->{username})) {
|
if (!exists($scfg->{username})) {
|
||||||
warn "ignoring password parameter\n";
|
warn "ignoring password parameter\n";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user