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:
Peter Lieven
2015-03-26 10:07:52 +01:00
parent b55ce5cc09
commit a45094b7a7
3 changed files with 23 additions and 30 deletions

View File

@@ -91,6 +91,8 @@ struct iscsi_url {
char target[MAX_STRING_SIZE + 1];
char user[MAX_STRING_SIZE + 1];
char passwd[MAX_STRING_SIZE + 1];
char target_user[MAX_STRING_SIZE + 1];
char target_passwd[MAX_STRING_SIZE + 1];
int lun;
struct iscsi_context *iscsi;
};