aboutsummaryrefslogtreecommitdiffstats
path: root/main/squark
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2014-11-27 15:48:01 +0200
committerTimo Teräs <timo.teras@iki.fi>2014-11-27 15:48:33 +0200
commite4209186efe7e176b3053e66c54d84f3d0ceb9c7 (patch)
tree64e06c8786ca3249e53e4f004401ebe87d1712be /main/squark
parent687eb6d7542443fa3a1f3c89bd71e2572d59610f (diff)
downloadaports-e4209186efe7e176b3053e66c54d84f3d0ceb9c7.tar.bz2
aports-e4209186efe7e176b3053e66c54d84f3d0ceb9c7.tar.xz
main/squark: fix crash in classification of certain urls
Diffstat (limited to 'main/squark')
-rw-r--r--main/squark/0001-fix-missing-symbols-from-lua-module.patch2
-rw-r--r--main/squark/0002-filter-default-path-is-const-and-thus-non-writable.patch37
-rw-r--r--main/squark/APKBUILD12
3 files changed, 46 insertions, 5 deletions
diff --git a/main/squark/0001-fix-missing-symbols-from-lua-module.patch b/main/squark/0001-fix-missing-symbols-from-lua-module.patch
index 82b046cae3..9eddab7eb9 100644
--- a/main/squark/0001-fix-missing-symbols-from-lua-module.patch
+++ b/main/squark/0001-fix-missing-symbols-from-lua-module.patch
@@ -21,5 +21,5 @@ index 8814b15..f8acd32 100644
CFLAGS_config.o += -DSQUARK_VERSION=\"$(FULL_VERSION)\" \
-DCONFDIR=\"$(CONFDIR)\" \
--
-2.1.3
+2.2.0
diff --git a/main/squark/0002-filter-default-path-is-const-and-thus-non-writable.patch b/main/squark/0002-filter-default-path-is-const-and-thus-non-writable.patch
new file mode 100644
index 0000000000..fe3fb1bf48
--- /dev/null
+++ b/main/squark/0002-filter-default-path-is-const-and-thus-non-writable.patch
@@ -0,0 +1,37 @@
+From bdb5a17e3570ee5bde564f894444125be16a233c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
+Date: Thu, 27 Nov 2014 15:45:31 +0200
+Subject: [PATCH] filter: default path is const and thus non-writable
+
+fix crash that would happen in blob_lowercase due to trying to
+write rodata.
+---
+ src/squark-filter.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/src/squark-filter.c b/src/squark-filter.c
+index 827540e..5ffcedf 100644
+--- a/src/squark-filter.c
++++ b/src/squark-filter.c
+@@ -168,8 +168,7 @@ static int url_parse(blob_t uri, struct url_info *nfo)
+ else
+ nfo->port = 80;
+ }
+- if (blob_is_null(nfo->path))
+- nfo->path = BLOB_STR("/");
++ if (blob_is_null(nfo->path)) nfo->path = slash;
+
+ /* significant host name */
+ nfo->significant_host = nfo->host;
+@@ -275,7 +274,7 @@ static int url_classify(struct url_info *url, struct sqdb *db)
+
+ /* and then search for path matches -- construct hashing
+ * string of url decoded path */
+- blob_lowercase(url->path); /* filter DB stores all URLs in lowercase */
++ if (url->path.ptr != slash.ptr) blob_lowercase(url->path); /* filter DB stores all URLs in lowercase */
+ blob_push_urldecode(&keybuf, url->path);
+ keylimits = blob_pushed(BLOB_BUF(buffer), keybuf);
+
+--
+2.2.0
+
diff --git a/main/squark/APKBUILD b/main/squark/APKBUILD
index cca07e01a2..6f001d27ec 100644
--- a/main/squark/APKBUILD
+++ b/main/squark/APKBUILD
@@ -1,13 +1,14 @@
# Maintainer: Timo Teras <timo.teras@iki.fi>
pkgname=squark
pkgver=0.6
-pkgrel=1
+pkgrel=2
pkgdesc="Squark - Squid User Authentication and Rating Kit"
subpackages=
depends="haserl"
makedepends="net-snmp-dev cmph-dev lua-dev pkgconfig"
source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.xz
0001-fix-missing-symbols-from-lua-module.patch
+ 0002-filter-default-path-is-const-and-thus-non-writable.patch
"
url="http://git.alpinelinux.org/cgit/squark/"
arch="all"
@@ -38,8 +39,11 @@ package() {
}
md5sums="8e34e77741ec043362b5554b58206ae1 squark-0.6.tar.xz
-ab48c3bfff96eac6a47267a0ad214363 0001-fix-missing-symbols-from-lua-module.patch"
+7d67e8e8b82419fcea1f55673e3db77c 0001-fix-missing-symbols-from-lua-module.patch
+9e2e559ba0ced976937d36714e61760e 0002-filter-default-path-is-const-and-thus-non-writable.patch"
sha256sums="6349f7b2d840712ef3f0f0eb32cbed4d53ede586a06f42807f1cfda888fd2952 squark-0.6.tar.xz
-464dcdaf0cb870686dd440b33308a86a44fc14510c1b38c83c561a3e0d492331 0001-fix-missing-symbols-from-lua-module.patch"
+91627ec0b38029f1397f06ebb73d8ec737a4af6ae3cdc40d77f61cac80930ea8 0001-fix-missing-symbols-from-lua-module.patch
+e5c71e52a1f1f6e5d3caf6d9e0289bb8d2aa9a7f8b1bf33cdd03d85adf823859 0002-filter-default-path-is-const-and-thus-non-writable.patch"
sha512sums="ba671d961b1b2d3026625b21336369e3b3dedc867dd8f68e85db3badcdb13afae8565a068e9337de6ba909c8780ff5ff0e59e4bab42f7f02a415f396654ead19 squark-0.6.tar.xz
-8824afa6f576f6e0f39381ba52874c6d17a1e4d5db6af6539b54d4aeb6ec85abf6324eb9f1cbee0a40b34cc3fd9c207a25726e6d21f02e9b4f50513f488c0dc0 0001-fix-missing-symbols-from-lua-module.patch"
+89583bcdc94ed45f0e09500e0b73946243d07b2d16b65188b29ef91c1162a8fc15074d5d62b29951f7a9ca332cdddf3f701dbc9ca948b6be170c178e438a16a5 0001-fix-missing-symbols-from-lua-module.patch
+8b28efaa75473e583121be8d76513e84d343c2a33431ede8c2b2b54610b0b1505fd58782de883ae3e9770cdba5db6b1af406a207f7b94969122ce31cb497f1bf 0002-filter-default-path-is-const-and-thus-non-writable.patch"