From d1fdaef5c640e981cb1633275a39fb0a9de5e794 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Sun, 20 Feb 2011 10:44:53 +1100 Subject: [PATCH] Username/password separator: Allow ':' to separate the chap username/password in addition to '%' --- lib/init.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/init.c b/lib/init.c index df32edf..65211da 100644 --- a/lib/init.c +++ b/lib/init.c @@ -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, '/');