aboutsummaryrefslogtreecommitdiffstats
path: root/main/coova-chilli
diff options
context:
space:
mode:
Diffstat (limited to 'main/coova-chilli')
-rw-r--r--main/coova-chilli/APKBUILD84
-rw-r--r--main/coova-chilli/chilli.confd1
-rw-r--r--main/coova-chilli/chilli.initd39
-rw-r--r--main/coova-chilli/coova-chilli.post-install2
-rw-r--r--main/coova-chilli/coova-chilli.pre-install6
-rw-r--r--main/coova-chilli/des.patch42
-rw-r--r--main/coova-chilli/posix-regex.patch135
-rw-r--r--main/coova-chilli/system.patch60
8 files changed, 0 insertions, 369 deletions
diff --git a/main/coova-chilli/APKBUILD b/main/coova-chilli/APKBUILD
deleted file mode 100644
index 4c19b696f5..0000000000
--- a/main/coova-chilli/APKBUILD
+++ /dev/null
@@ -1,84 +0,0 @@
-# Contributor: grharry
-# Maintainer:
-pkgname=coova-chilli
-pkgver=1.4
-pkgrel=3
-pkgdesc="CoovaChilli is an open source access controller for wireless LAN"
-url="http://www.coova.org/"
-arch="all"
-license="GPL-3.0-or-later"
-makedepends="perl openssl-dev autoconf automake libtool curl-dev
- linux-headers gengetopt-dev"
-install="$pkgname.pre-install"
-pkgusers="chilli"
-pkggroups="chilli"
-subpackages="$pkgname-doc $pkgname-dev"
-source="$pkgname-$pkgver.tar.gz::https://github.com/coova/coova-chilli/archive/$pkgver.tar.gz
- chilli.initd
- chilli.confd
- posix-regex.patch
- system.patch
- des.patch
- "
-options="suid"
-
-prepare() {
- default_prepare
- sed -i 's/-Werror//g' src/Makefile.am
- sed -i 's%(localstatedir)/run%(localstatedir)%' src/Makefile.am
- libtoolize --force \
- && autoreconf -vif
-}
-
-build() {
- ./configure \
- --build=$CBUILD \
- --host=$CHOST \
- --prefix=/usr \
- --sysconfdir=/etc \
- --mandir=/usr/share/man \
- --infodir=/usr/share/info \
- --localstatedir=/var/run/chilli \
- --libdir=/usr/lib \
- --sysconfdir=/etc \
- --with-openssl \
- --with-poll \
- --enable-binstatusfile \
- --enable-statusfile \
- --enable-chillixml \
- --enable-ipwhitelist \
- --enable-redirinject \
- --enable-redirdnsreq \
- --enable-redirinject \
- --enable-debug \
- --enable-debug2 \
- --enable-miniportal \
- --enable-sessgarden \
- --enable-shared \
- --enable-chilliredir \
- --enable-chilliscript \
- --enable-layer3 \
- --enable-dhcpopt \
- --enable-largelimits
- export CFLAGS="$CFLAGS -Wno-error=unused-but-set-variable"
- make -j1
-}
-
-check() {
- make check
-}
-
-package() {
- make DESTDIR="$pkgdir" install
-
- install -Dm755 "$srcdir"/chilli.initd "$pkgdir"/etc/init.d/chilli
- install -Dm644 "$srcdir"/chilli.confd "$pkgdir"/etc/conf.d/chilli
- install -d -o $pkgusers -g $pkggroups "$pkgdir"/var/run/chilli
-}
-
-sha512sums="2ee31731c59af0f4282255a76ef045e9f37dc85da6d18a374154ae5cc690dc485acae2d83372bf48d9326db53292603d69b0093e845b4d08b26d2586455590c5 coova-chilli-1.4.tar.gz
-eb0feda33f74256cedd4987d22427c1575f4de08636ff02c16cb4f6710a54dce0d23410d56e961727d4e78f5f4fb0a7848505215e5c91518301d1e81b589ecde chilli.initd
-840712709974d5a3567e0a14cb05d7e394bf73ac06c0ea865c00351d916f794ec3e70bfbc9255afd419aeceaae3f4b0cbf7e770ccd23af1e677e15821c1690cf chilli.confd
-d47d176d01eda436b04700bb4404fe2a3c17e00bd8c2e4ed08149841c3e692435fee4f7dc22135d07b95556dd2f2d08b540a345bb7d5bdff3266bfcc46dcda76 posix-regex.patch
-7dbfa571f5eb7065a3a6c2f7c14e2d33cec52771e0236f29837d28cc216ca5a12eb31e1f3d3a780964c8e0f65eb057a9c040b14c65d84cd8483858f757240d6b system.patch
-b2dce18c72808e58dd97a235191e9b843f0bfa06805b12c39488bf4464d055c0734248c89c571cc8069e0f06856f7fcf8458aac84f895da4ed2b0ceb7cbd6f82 des.patch"
diff --git a/main/coova-chilli/chilli.confd b/main/coova-chilli/chilli.confd
deleted file mode 100644
index 8133a04c58..0000000000
--- a/main/coova-chilli/chilli.confd
+++ /dev/null
@@ -1 +0,0 @@
-CHILLI_OPTS="--name chilli --group chilli"
diff --git a/main/coova-chilli/chilli.initd b/main/coova-chilli/chilli.initd
deleted file mode 100644
index 3e75949f6e..0000000000
--- a/main/coova-chilli/chilli.initd
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/sbin/openrc-run
-
-depend() {
- use net
- after firewall
- provide chilli
-}
-
-checkconfig() {
- if [ -f /etc/chilli.conf ]; then
- return 0;
- else
- eerror "Error starting CoovaChilli. Please create /etc/chilli.conf before."
- return 1;
- fi
-
-}
-
-start() {
- checkconfig || return 1
- ebegin "Starting CoovaChilli Captive Portal"
-
- echo 1 > /proc/sys/net/ipv4/ip_forward
- lsmod | grep tun >& /dev/null
-
- if [ $? -ne 0 ]; then
- modprobe tun >& /dev/null
- fi
-
- start-stop-daemon --start --pidfile /var/run/chilli/chilli.pid --quiet \
- --exec /usr/sbin/chilli ${CHILLI_OPTS} -- --pidfile=/var/run/chilli/chilli.pid
- eend $?
-}
-
-stop() {
- ebegin "Stopping CoovaChilli Captive Portal"
- start-stop-daemon --stop --pidfile /var/run/chilli.pid --quiet
- eend $?
-}
diff --git a/main/coova-chilli/coova-chilli.post-install b/main/coova-chilli/coova-chilli.post-install
deleted file mode 100644
index 10dfc9576a..0000000000
--- a/main/coova-chilli/coova-chilli.post-install
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-chown -R chilli:chilli /var/run/chilli
diff --git a/main/coova-chilli/coova-chilli.pre-install b/main/coova-chilli/coova-chilli.pre-install
deleted file mode 100644
index 342778dcd6..0000000000
--- a/main/coova-chilli/coova-chilli.pre-install
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-addgroup -S chilli 2>/dev/null
-adduser -S -D -H -s /sbin/nologin -G chilli -g chilli chilli 2>/dev/null
-
-exit 0
diff --git a/main/coova-chilli/des.patch b/main/coova-chilli/des.patch
deleted file mode 100644
index ae647d5970..0000000000
--- a/main/coova-chilli/des.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 1a809062ecab70de13e299487fdd635434bc86d8 Mon Sep 17 00:00:00 2001
-From: Natanael Copa <ncopa@alpinelinux.org>
-Date: Tue, 4 Oct 2016 20:31:54 +0200
-Subject: [PATCH] Replace deprecated des_ with DES_
-
-The des_* fuctions were renamed to DES_ with openssl 0.9.7 (2002). This
-fixes building with libressl and probably openssl 1.1.0 too.
----
- src/ms_chap.c | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/src/ms_chap.c b/src/ms_chap.c
-index 2c236d2..8ad8327 100644
---- a/src/ms_chap.c
-+++ b/src/ms_chap.c
-@@ -96,18 +96,18 @@ MakeKey(u_char *key, u_char *des_key)
- des_key[6] = Get7Bits(key, 42);
- des_key[7] = Get7Bits(key, 49);
-
-- des_set_odd_parity((des_cblock *)des_key);
-+ DES_set_odd_parity((DES_cblock *)des_key);
- }
-
- static void /* IN 8 octets IN 7 octest OUT 8 octets */
- DesEncrypt(u_char *clear, u_char *key, u_char *cipher)
- {
-- des_cblock des_key;
-- des_key_schedule key_schedule;
-+ DES_cblock des_key;
-+ DES_key_schedule key_schedule;
-
- MakeKey(key, des_key);
-- des_set_key(&des_key, key_schedule);
-- des_ecb_encrypt((des_cblock *)clear, (des_cblock *)cipher, key_schedule, 1);
-+ DES_set_key(&des_key, &key_schedule);
-+ DES_ecb_encrypt((DES_cblock *)clear, (DES_cblock *)cipher, &key_schedule, 1);
- }
-
- #define LENGTH 20
---
-2.10.0
-
diff --git a/main/coova-chilli/posix-regex.patch b/main/coova-chilli/posix-regex.patch
deleted file mode 100644
index 12ce4427d8..0000000000
--- a/main/coova-chilli/posix-regex.patch
+++ /dev/null
@@ -1,135 +0,0 @@
-From 60031538ecbf9004ae195114cc5e4ea40cca7d06 Mon Sep 17 00:00:00 2001
-From: Natanael Copa <ncopa@alpinelinux.org>
-Date: Tue, 4 Oct 2016 20:01:49 +0200
-Subject: [PATCH] Improve portability for regex
-
-Do not depend on internal, platform dependant field in regex_t to detect
-if the regex was compiled or not. Instead, use a flag that we set for
-that.
-
-This fixes build with musl libc.
----
- src/garden.h | 11 ++++++++---
- src/main-redir.c | 26 +++++++++++---------------
- src/options.c | 27 +++++++++++++++------------
- 3 files changed, 34 insertions(+), 30 deletions(-)
-
-diff --git a/src/garden.h b/src/garden.h
-index 1b07a23..84563e9 100644
---- a/src/garden.h
-+++ b/src/garden.h
-@@ -39,13 +39,18 @@ typedef struct pass_through_t {
- (a)->port == (b)->port)
-
- #ifdef ENABLE_CHILLIREDIR
-+struct chilli_regex {
-+ regex_t re;
-+ char allocated:1;
-+};
-+
- typedef struct regex_pass_through_t {
- char regex_host[512];
- char regex_path[512];
- char regex_qs[512];
-- regex_t re_host;
-- regex_t re_path;
-- regex_t re_qs;
-+ struct chilli_regex re_host;
-+ struct chilli_regex re_path;
-+ struct chilli_regex re_qs;
- uint8_t inuse:1;
- uint8_t neg_host:1;
- uint8_t neg_path:1;
-diff --git a/src/main-redir.c b/src/main-redir.c
-index c7b0f07..001f882 100644
---- a/src/main-redir.c
-+++ b/src/main-redir.c
-@@ -501,29 +501,25 @@ static int redir_conn_read(struct conn_t *conn, void *ctx) {
- }
-
- static int
--check_regex(regex_t *re, char *regex, char *s) {
-+check_regex(struct chilli_regex *re, char *regex, char *s) {
- int ret;
-
- #if(_debug_)
- syslog(LOG_DEBUG, "Checking %s =~ %s", s, regex);
- #endif
-
--#if defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__) || defined (__NetBSD__)
-- if (!re->re_g)
--#else
-- if (!re->allocated)
--#endif
-- {
-- if ((ret = regcomp(re, regex, REG_EXTENDED | REG_NOSUB)) != 0) {
-- char error[512];
-- regerror(ret, re, error, sizeof(error));
-- syslog(LOG_ERR, "regcomp(%s) failed (%s)", regex, error);
-- regex[0] = 0;
-- return -1;
-- }
-+ if (!re->allocated) {
-+ if ((ret = regcomp(&re->re, regex, REG_EXTENDED | REG_NOSUB)) != 0) {
-+ char error[512];
-+ regerror(ret, &re->re, error, sizeof(error));
-+ syslog(LOG_ERR, "regcomp(%s) failed (%s)", regex, error);
-+ regex[0] = 0;
-+ return -1;
- }
-+ re->allocated = 1;
-+ }
-
-- if ((ret = regexec(re, s, 0, 0, 0)) == 0) {
-+ if ((ret = regexec(&re->re, s, 0, 0, 0)) == 0) {
-
- syslog(LOG_DEBUG, "Matched regex %s", regex);
- return 0;
-diff --git a/src/options.c b/src/options.c
-index 28f1b35..d6be8d0 100644
---- a/src/options.c
-+++ b/src/options.c
-@@ -219,6 +219,16 @@ int options_mkdir(char *path) {
- return 0;
- }
-
-+#ifdef ENABLE_CHILLIREDIR
-+static void chilli_regfree(struct chilli_regex *re)
-+{
-+ if (!re->allocated)
-+ return;
-+ regfree(&re->re);
-+ re->allocated = 0;
-+}
-+#endif
-+
- int options_fromfd(int fd, bstring bt) {
- uint8_t cksum[16], cksum_check[16];
- struct options_t o;
-@@ -380,18 +390,11 @@ int options_fromfd(int fd, bstring bt) {
-
- #ifdef ENABLE_CHILLIREDIR
- for (i = 0; i < MAX_REGEX_PASS_THROUGHS; i++) {
--#if defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__) || defined (__NetBSD__)
-- regfree(&_options.regex_pass_throughs[i].re_host);
-- regfree(&_options.regex_pass_throughs[i].re_path);
-- regfree(&_options.regex_pass_throughs[i].re_qs);
--#else
-- if (_options.regex_pass_throughs[i].re_host.allocated)
-- regfree(&_options.regex_pass_throughs[i].re_host);
-- if (_options.regex_pass_throughs[i].re_path.allocated)
-- regfree(&_options.regex_pass_throughs[i].re_path);
-- if (_options.regex_pass_throughs[i].re_qs.allocated)
-- regfree(&_options.regex_pass_throughs[i].re_qs);
--#endif
-+ if (_options.regex_pass_throughs[i].re_host.allocated) {
-+ chilli_regfree(&_options.regex_pass_throughs[i].re_host);
-+ chilli_regfree(&_options.regex_pass_throughs[i].re_path);
-+ chilli_regfree(&_options.regex_pass_throughs[i].re_qs);
-+ }
- }
- #endif
-
---
-2.10.0
-
diff --git a/main/coova-chilli/system.patch b/main/coova-chilli/system.patch
deleted file mode 100644
index 17d3ba3bb7..0000000000
--- a/main/coova-chilli/system.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-diff --git a/src/system.h b/src/system.h
-index 6ddf98c..3efef6a 100644
---- a/src/system.h
-+++ b/src/system.h
-@@ -117,27 +117,6 @@
- #include <inttypes.h>
- #endif
-
--#if defined(__linux__)
--#include <asm/types.h>
--#include <linux/if.h>
--#include <linux/if_packet.h>
--#include <linux/if_ether.h>
--#include <linux/if_tun.h>
--#include <linux/netlink.h>
--#include <linux/rtnetlink.h>
--#ifndef HAVE_SYS_UN_H
--#include <linux/un.h>
--#endif
--
--#ifdef HAVE_SYS_SYSINFO_H
--#include <sys/sysinfo.h>
--#else
--#ifdef HAVE_LINUX_SYSINFO_H
--#define _LINUX_KERNEL_H
--#include <linux/sysinfo.h>
--#endif
--#endif
--
- #elif defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__) || defined (__NetBSD__)
- #include <net/if.h>
- #include <net/bpf.h>
-@@ -244,6 +223,27 @@
- #include <unistd.h>
- #include <errno.h>
-
-+#if defined(__linux__)
-+#include <asm/types.h>
-+#include <linux/if.h>
-+#include <linux/if_packet.h>
-+#include <linux/if_ether.h>
-+#include <linux/if_tun.h>
-+#include <linux/netlink.h>
-+#include <linux/rtnetlink.h>
-+#ifndef HAVE_SYS_UN_H
-+#include <linux/un.h>
-+#endif
-+
-+#ifdef HAVE_SYS_SYSINFO_H
-+#include <sys/sysinfo.h>
-+#else
-+#ifdef HAVE_LINUX_SYSINFO_H
-+#define _LINUX_KERNEL_H
-+#include <linux/sysinfo.h>
-+#endif
-+#endif
-+
- int safe_accept(int fd, struct sockaddr *sa, socklen_t *lenptr);
- int safe_select(int nfds, fd_set *readfds, fd_set *writefds,
- fd_set *exceptfds, struct timeval *timeout);