]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
Append vpninfo->urlpath to <group-access>
authorMurilo Opsfelder Araujo <muriloo@linux.vnet.ibm.com>
Thu, 12 Sep 2013 17:53:54 +0000 (14:53 -0300)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Thu, 19 Sep 2013 18:23:13 +0000 (13:23 -0500)
Some ASA gateways may need the relative path specified in <group-access> XML
entry so it makes sense to verify if it exists and append it.

Signed-off-by: Murilo Opsfelder Araujo <muriloo@linux.vnet.ibm.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
auth.c
www/changelog.xml

diff --git a/auth.c b/auth.c
index 5acd04b668d019a30a34b55746893a7b3366e8bb..f28e350884b5ae59b6a74194bbe03c389474a938 100644 (file)
--- a/auth.c
+++ b/auth.c
@@ -780,11 +780,17 @@ int xmlpost_initial_req(struct openconnect_info *vpninfo, char *request_body, in
        xmlNodePtr root, node;
        xmlDocPtr doc = xmlpost_new_query(vpninfo, "init", &root);
        char *url;
+       int result;
 
        if (!doc)
                return -ENOMEM;
 
-       if (asprintf(&url, "https://%s", vpninfo->hostname) == -1)
+       if (vpninfo->urlpath)
+               result = asprintf(&url, "https://%s/%s", vpninfo->hostname, vpninfo->urlpath);
+       else
+               result = asprintf(&url, "https://%s", vpninfo->hostname);
+
+       if (result == -1)
                goto bad;
        node = xmlNewTextChild(root, NULL, XCAST("group-access"), XCAST(url));
        free(url);
index cabbb2a23a855665400d572416b45f3bcac967eb..229e5d23bdeb7ccd5c344c45bb2e5576cefddf99 100644 (file)
@@ -17,7 +17,7 @@
 <ul>
    <li><b>OpenConnect HEAD</b>
      <ul>
-       <li><i>No changelog entries yet</i></li>
+       <li>Include path in <tt>&amp;lt;group-access&amp;gt;</tt> node.</li>
      </ul><br/>
   </li>
   <li><b><a href="ftp://ftp.infradead.org/pub/openconnect/openconnect-5.01.tar.gz">OpenConnect v5.01</a></b>