Username/password separator: Allow ':' to separate the chap username/password in addition to '%'

This commit is contained in:
Ronnie Sahlberg
2011-02-20 10:44:53 +11:00
parent b1955c69ff
commit d1fdaef5c6

View File

@@ -316,10 +316,14 @@ iscsi_parse_full_url(struct iscsi_context *iscsi, const char *url)
portal = tmp;
tmp = strchr(user, '%');
if (tmp == NULL) {
tmp = strchr(user, ':');
}
if (tmp != NULL) {
*tmp++ = 0;
passwd = tmp;
}
}
target = strchr(portal, '/');