cifs: improve warning for password but no username set
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
@ -160,7 +160,7 @@ sub on_add_hook {
|
|||||||
if (defined($sensitive{password})) {
|
if (defined($sensitive{password})) {
|
||||||
cifs_set_credentials($sensitive{password}, $storeid);
|
cifs_set_credentials($sensitive{password}, $storeid);
|
||||||
if (!exists($scfg->{username})) {
|
if (!exists($scfg->{username})) {
|
||||||
warn "ignoring password parameter\n";
|
warn "storage $storeid: ignoring password parameter, no user set\n";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
cifs_delete_credentials($storeid);
|
cifs_delete_credentials($storeid);
|
||||||
@ -177,7 +177,7 @@ sub on_update_hook {
|
|||||||
if (defined($sensitive{password})) {
|
if (defined($sensitive{password})) {
|
||||||
cifs_set_credentials($sensitive{password}, $storeid);
|
cifs_set_credentials($sensitive{password}, $storeid);
|
||||||
if (!exists($scfg->{username})) {
|
if (!exists($scfg->{username})) {
|
||||||
warn "ignoring password parameter\n";
|
warn "storage $storeid: ignoring password parameter, no user set\n";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
cifs_delete_credentials($storeid);
|
cifs_delete_credentials($storeid);
|
||||||
|
|||||||
Reference in New Issue
Block a user