diff options
Diffstat (limited to 'testing')
-rw-r--r-- | testing/radsecproxy/0001-fix-memory-allocation-in-t_rewrite_config-fix-71.patch | 56 | ||||
-rw-r--r-- | testing/radsecproxy/APKBUILD | 49 | ||||
-rw-r--r-- | testing/radsecproxy/radsecproxy.confd | 11 | ||||
-rw-r--r-- | testing/radsecproxy/radsecproxy.initd | 39 |
4 files changed, 155 insertions, 0 deletions
diff --git a/testing/radsecproxy/0001-fix-memory-allocation-in-t_rewrite_config-fix-71.patch b/testing/radsecproxy/0001-fix-memory-allocation-in-t_rewrite_config-fix-71.patch new file mode 100644 index 0000000000..af07c29f7b --- /dev/null +++ b/testing/radsecproxy/0001-fix-memory-allocation-in-t_rewrite_config-fix-71.patch @@ -0,0 +1,56 @@ +From 7151b71afb2dfc748ed2ca7c124e271b4f390206 Mon Sep 17 00:00:00 2001 +From: Fabian Mauchle <mauchle@macfma.switch.ch> +Date: Fri, 4 Sep 2020 13:08:54 +0200 +Subject: [PATCH] fix memory allocation in t_rewrite_config (fix #71) + +--- + tests/t_rewrite.c | 1 + + tests/t_rewrite_config.c | 6 ++---- + 2 files changed, 3 insertions(+), 4 deletions(-) + +diff --git a/tests/t_rewrite.c b/tests/t_rewrite.c +index 80d6bee..184accf 100644 +--- a/tests/t_rewrite.c ++++ b/tests/t_rewrite.c +@@ -685,6 +685,7 @@ main (int argc, char *argv[]) + printf("not "); + printf("ok %d - issue #62\n", testcount++); + ++ regfree(®ex); + _tlv_list_clear(origattrs); + _tlv_list_clear(expectedattrs); + _reset_rewrite(&rewrite); +diff --git a/tests/t_rewrite_config.c b/tests/t_rewrite_config.c +index 129bbbd..6d3f043 100644 +--- a/tests/t_rewrite_config.c ++++ b/tests/t_rewrite_config.c +@@ -23,7 +23,7 @@ main (int argc, char *argv[]) + numtests = 1; + + { +- addattrs = malloc(2); ++ addattrs = malloc(2*sizeof(char*)); + addattrs[0] = stringcopy("1:'1%00%001%41%2541", 0); + addattrs[1] = NULL; + +@@ -55,7 +55,7 @@ main (int argc, char *argv[]) + /* test issue #62 */ + { + char *expectreplace = "\\1=86400"; +- char **modvattrs = malloc(2); ++ char **modvattrs = malloc(2*sizeof(char*)); + rewritename= "issue62"; + + modvattrs[0] = stringcopy("9:102:/^(h323-credit-time).*$/\\1=86400/",0); +@@ -79,8 +79,6 @@ main (int argc, char *argv[]) + } else { + printf("not ok %d - rewrite config issue #62\n", numtests++); + } +- +- free(modvattrs); + } + + return 0; +-- +2.28.0 + diff --git a/testing/radsecproxy/APKBUILD b/testing/radsecproxy/APKBUILD new file mode 100644 index 0000000000..37f30b9684 --- /dev/null +++ b/testing/radsecproxy/APKBUILD @@ -0,0 +1,49 @@ +# Maintainer: Josef Vybíhal <jvybihal@uniscomp.cz> +pkgname=radsecproxy +pkgver=1.8.2 +pkgrel=0 +pkgdesc="radsecproxy is a generic RADIUS proxy that supports both UDP and TLS (RadSec) RADIUS transports." +url="https://github.com/radsecproxy/radsecproxy" +arch="all" +license="BSD-3-Clause" +makedepends="nettle-dev openssl-dev autoconf automake" +subpackages="$pkgname-doc $pkgname-openrc" +source="https://github.com/radsecproxy/radsecproxy/releases/download/$pkgver/radsecproxy-$pkgver.tar.gz + $pkgname.initd + $pkgname.confd + 0001-fix-memory-allocation-in-t_rewrite_config-fix-71.patch" + +prepare() { + default_prepare + autoreconf -fi +} + +build() { + ./configure \ + --prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/bin \ + --sysconfdir=/etc/radsecproxy + make + +} + +check() { + make check +} + +package() { + make DESTDIR="$pkgdir" install + + install -D -m0644 radsecproxy.conf-example "$pkgdir"/etc/radsecproxy/radsecproxy.conf + + install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname + install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname + + install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE +} + +sha512sums="a755f67d22c225fc236bb2b28d6681fdb4e615ea971477ed1d7669049b0da8590697b2ec150a6cc0e9d20426260c42712984b9b940649c87a87dcd8f0d90d7d3 radsecproxy-1.8.2.tar.gz +fb9b2761071f3773fe4c15ed74372333c0d7f39feb84eb48dbf8b531c85a5d4d3ae15fe8933f3f56c57bbf5047e9e08b652f0c44d7e974ec8d56909f3e308f30 radsecproxy.initd +e1e7b62fd92d7433430cbef5fcb99b0213f140c8aaa03f63ac2f432cead005e276c34ce2f8f6473b602e85160dc3cf8cb2e5209a6f026b740b4056208b40d073 radsecproxy.confd +a59d686b43f3b82655ffa14fab50f7491db3e93bcfa3c0885dca8338b8ee2f543c0dc600a2ea5f47c2639b88ed149b8a539ea3cdabfdb488e6174f802d43d803 0001-fix-memory-allocation-in-t_rewrite_config-fix-71.patch" diff --git a/testing/radsecproxy/radsecproxy.confd b/testing/radsecproxy/radsecproxy.confd new file mode 100644 index 0000000000..b831e90361 --- /dev/null +++ b/testing/radsecproxy/radsecproxy.confd @@ -0,0 +1,11 @@ +# Configuration for /etc/init.d/radsecproxy + +# Path of the main configuration file. +cfgfile="/etc/radsecproxy/radsecproxy.conf" + +# command to run +command=/usr/bin/radsecproxy + +# radsecproxy arguments for $command +# can append -d as debug level (1-5) +command_args="-c $cfgfile" diff --git a/testing/radsecproxy/radsecproxy.initd b/testing/radsecproxy/radsecproxy.initd new file mode 100644 index 0000000000..c967c4d5c1 --- /dev/null +++ b/testing/radsecproxy/radsecproxy.initd @@ -0,0 +1,39 @@ +#!/sbin/openrc-run +supervisor=supervise-daemon + +description="generic RADIUS proxy" +description_checkconfig="Check configuration" +description_reload="Reload configuration" +description_reopen="Reopen log files" + +command_args_foreground="-f" + +required_files="$cfgfile" + +depend() { + need net + use dns logger netmount +} + +start_pre() { + $command $command_args -p +} + +checkconfig() { + ebegin "Checking $name configuration" + + start_pre + eend $? +} + +reload() { + ebegin "Reloading $name configuration" + start_pre && supervise-daemon --signal HUP + eend $? +} + +reopen() { + ebegin "Reopening $name log files" + supervise-daemon --signal USR1 + eend $? +} |