init: fix segfaul in iscsi_parse_url
We allowed iscsi to be NULL in iscsi_parse_url. Especially qemu does this and currently segfaults at start. Change the usage guidelines for target username/password to be the same as for chap username/password. Signed-off-by: Peter Lieven <pl@kamp.de>
This commit is contained in:
@@ -282,12 +282,8 @@ try_again:
|
||||
|
||||
iscsi_set_header_digest(iscsi, old_iscsi->want_header_digest);
|
||||
|
||||
if (old_iscsi->user[0]) {
|
||||
iscsi_set_initiator_username_pwd(iscsi, old_iscsi->user, old_iscsi->passwd);
|
||||
}
|
||||
if (old_iscsi->target_user[0]) {
|
||||
iscsi_set_target_username_pwd(iscsi, old_iscsi->target_user, old_iscsi->target_passwd);
|
||||
}
|
||||
iscsi_set_initiator_username_pwd(iscsi, old_iscsi->user, old_iscsi->passwd);
|
||||
iscsi_set_target_username_pwd(iscsi, old_iscsi->target_user, old_iscsi->target_passwd);
|
||||
|
||||
iscsi_set_session_type(iscsi, ISCSI_SESSION_NORMAL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user