diff options
author | joerg <joerg@pkgsrc.org> | 2012-11-07 15:31:23 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2012-11-07 15:31:23 +0000 |
commit | 013f277f11aa6cb5c324854bf0e66b651e92f9b7 (patch) | |
tree | 0763d5e8b65724407b382c2af931f1821b7e00f6 | |
parent | b3ed98ab43ac9ec37d1da14333a80728a274b2be (diff) | |
download | pkgsrc-013f277f11aa6cb5c324854bf0e66b651e92f9b7.tar.gz |
Don't use nested functions. Bump revision.
-rw-r--r-- | security/lasso/Makefile | 4 | ||||
-rw-r--r-- | security/lasso/distinfo | 4 | ||||
-rw-r--r-- | security/lasso/patches/patch-lasso-xml-tools.c | 70 |
3 files changed, 63 insertions, 15 deletions
diff --git a/security/lasso/Makefile b/security/lasso/Makefile index 0dfdebff468..d59d08e6691 100644 --- a/security/lasso/Makefile +++ b/security/lasso/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.13 2012/10/03 21:57:24 wiz Exp $ +# $NetBSD: Makefile,v 1.14 2012/11/07 15:31:23 joerg Exp $ # -PKGREVISION= 7 +PKGREVISION= 8 CONFIGURE_ARGS+= --disable-python CONFIGURE_ARGS+= --disable-php5 diff --git a/security/lasso/distinfo b/security/lasso/distinfo index a0761218abc..1eaf3422695 100644 --- a/security/lasso/distinfo +++ b/security/lasso/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.12 2012/10/23 18:16:15 manu Exp $ +$NetBSD: distinfo,v 1.13 2012/11/07 15:31:23 joerg Exp $ SHA1 (lasso-2.3.6.tar.gz) = 92689a873b83e02efb4a6c3a375f040a9e75c95c RMD160 (lasso-2.3.6.tar.gz) = 5e1aaba807d453c1fad28be6a8f06d908159b3fe @@ -10,7 +10,7 @@ SHA1 (patch-docs-reference-lasso-lasso-sections.txt) = 9e6936b0c019b8fb8b9493f91 SHA1 (patch-lasso-errors_c) = 5c0fe304cd9cce6d926362c248ffe60c2c7357c5 SHA1 (patch-lasso-errors_c_in) = d4663edb280d38a0cb1a422d9b95b1d344012f63 SHA1 (patch-lasso-id-ff-provider.c) = 9312c67a8e81eeea95b888745a2b9f504a36a36f -SHA1 (patch-lasso-xml-tools.c) = fa0feb771cfdec56bd76fdc9e3d65eae4a78332f +SHA1 (patch-lasso-xml-tools.c) = b04540e06a2ef359972bdee3d8fdf7d11c355cc2 SHA1 (patch-lasso_id-ff_lecp.c) = 90b0d3b06a6582f779706b671c497ad7a556a116 SHA1 (patch-lasso_id-ff_session.c) = 839277d013e219c5ba91bae1ab75cef5d99d9286 SHA1 (patch-lasso_saml-2.0_ecp.c) = cb946f383b9d3fed4ce794deb96a143077746a2c diff --git a/security/lasso/patches/patch-lasso-xml-tools.c b/security/lasso/patches/patch-lasso-xml-tools.c index ee223c2fe5c..e09c16d7afa 100644 --- a/security/lasso/patches/patch-lasso-xml-tools.c +++ b/security/lasso/patches/patch-lasso-xml-tools.c @@ -1,4 +1,4 @@ -$NetBSD: patch-lasso-xml-tools.c,v 1.3 2012/10/23 18:16:15 manu Exp $ +$NetBSD: patch-lasso-xml-tools.c,v 1.4 2012/11/07 15:31:23 joerg Exp $ Patch from upstream to support libxml >= 2.9.0. From commit message: @@ -10,11 +10,21 @@ appeared in recent version of libxml; but the reference API document does not give any introduction date for functions so it's hard to be sure. +Don't use nested functions. + diff --git a/lasso/xml/tools.c b/lasso/xml/tools.c index c4b3c8a..cda8775 100644 ---- lasso/xml/tools.c +--- lasso/xml/tools.c.orig 2011-11-29 09:19:49.000000000 +0000 +++ lasso/xml/tools.c -@@ -36,6 +36,7 @@ +@@ -27,6 +27,7 @@ + /* permit importation of timegm for glibc2, wait for people to complain it does not work on their + * system. */ + #define _BSD_SOURCE ++#define _NETBSD_SOURCE + #include "private.h" + #include <string.h> + #include <time.h> +@@ -36,6 +37,7 @@ #include <libxml/uri.h> #include <libxml/parser.h> #include <libxml/parserInternals.h> @@ -22,7 +32,7 @@ index c4b3c8a..cda8775 100644 #include <openssl/pem.h> #include <openssl/sha.h> -@@ -1043,38 +1044,30 @@ lasso_sign_node(xmlNode *xmlnode, const char *id_attr_name, const char *id_value +@@ -1043,38 +1045,30 @@ lasso_sign_node(xmlNode *xmlnode, const return 0; } @@ -73,7 +83,7 @@ index c4b3c8a..cda8775 100644 stream.avail_in = in_len; stream.next_out = ret; stream.avail_out = in_len * 2; -@@ -1097,6 +1090,7 @@ lasso_node_build_deflated_query(LassoNode *node) +@@ -1097,6 +1091,7 @@ lasso_node_build_deflated_query(LassoNod rc = deflateEnd(&stream); } } @@ -81,7 +91,7 @@ index c4b3c8a..cda8775 100644 if (rc != Z_OK) { lasso_release(ret); message(G_LOG_LEVEL_CRITICAL, "Failed to deflate"); -@@ -1104,7 +1098,6 @@ lasso_node_build_deflated_query(LassoNode *node) +@@ -1104,7 +1099,6 @@ lasso_node_build_deflated_query(LassoNod } b64_ret = xmlSecBase64Encode(ret, stream.total_out, 0); @@ -89,7 +99,7 @@ index c4b3c8a..cda8775 100644 lasso_release(ret); ret = xmlURIEscapeStr(b64_ret, NULL); -@@ -1115,6 +1108,20 @@ lasso_node_build_deflated_query(LassoNode *node) +@@ -1115,6 +1109,20 @@ lasso_node_build_deflated_query(LassoNod return rret; } @@ -110,7 +120,48 @@ index c4b3c8a..cda8775 100644 gboolean lasso_node_init_from_deflated_query_part(LassoNode *node, char *deflate_string) { -@@ -2144,22 +2151,21 @@ cleanup: +@@ -1196,28 +1204,34 @@ lasso_concat_url_query(const char *url, + * + * Return value: TRUE if no error occurred during evaluation, FALSE otherwise. + */ ++static void ++structuredErrorFunc (void *userData, xmlErrorPtr error) { ++ struct wrapped_cb_data *data = userData; ++ *(int *)userData = error->code; ++} ++ + gboolean + lasso_eval_xpath_expression(xmlXPathContextPtr xpath_ctx, const char *expression, + xmlXPathObjectPtr *xpath_object_ptr, int *xpath_error_code) + { +- xmlXPathObject *xpath_object = NULL; +- int errorCode = 0; + xmlStructuredErrorFunc oldStructuredErrorFunc; ++ void *oldUserData; ++ int errorCode = 0; ++ xmlXPathObject *xpath_object = NULL; + gboolean rc = TRUE; + +- void structuredErrorFunc (G_GNUC_UNUSED void *userData, xmlErrorPtr error) { +- errorCode = error->code; +- } +- + g_return_val_if_fail(xpath_ctx != NULL && expression != NULL, FALSE); + + if (xpath_error_code) { /* reset */ + *xpath_error_code = 0; + } + oldStructuredErrorFunc = xpath_ctx->error; ++ oldUserData = xpath_ctx->userData; + xpath_ctx->error = structuredErrorFunc; ++ xpath_ctx->userData = &errorCode; + xpath_object = xmlXPathEvalExpression((xmlChar*)expression, xpath_ctx); + xpath_ctx->error = oldStructuredErrorFunc; ++ xpath_ctx->userData = oldUserData; + + if (xpath_object) { + if (xpath_object_ptr) { +@@ -2144,22 +2158,21 @@ cleanup: char* lasso_xmlnode_to_string(xmlNode *node, gboolean format, int level) { @@ -142,6 +193,3 @@ index c4b3c8a..cda8775 100644 return str; } --- -1.7.4.1 - |