cifs: improve warning for password but no username set

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht
2021-07-06 07:50:29 +02:00
parent 02f43ab4a8
commit b4e88b7fd3

View File

@ -160,7 +160,7 @@ sub on_add_hook {
if (defined($sensitive{password})) {
cifs_set_credentials($sensitive{password}, $storeid);
if (!exists($scfg->{username})) {
warn "ignoring password parameter\n";
warn "storage $storeid: ignoring password parameter, no user set\n";
}
} else {
cifs_delete_credentials($storeid);
@ -177,7 +177,7 @@ sub on_update_hook {
if (defined($sensitive{password})) {
cifs_set_credentials($sensitive{password}, $storeid);
if (!exists($scfg->{username})) {
warn "ignoring password parameter\n";
warn "storage $storeid: ignoring password parameter, no user set\n";
}
} else {
cifs_delete_credentials($storeid);