From 6855683e3e1ce0c5e710c4cf67f4373aedddd6b2 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Mon, 17 Aug 2020 02:13:44 +0100 Subject: hs20: prepare server using uci-defaults and ship files Setup user database if non-existent, configure uhttpd .php interpreter and patch php scripts to work out-of-the-box. Also ship Hotspot 2.0 SPP and OMA DM XML schema/DTD files needed at run-time for both client and server. Signed-off-by: Daniel Golle --- .../patches/100-fix-hs20_spp_server-path.patch | 11 ++++++++++ net/hs20/patches/200-adapt-config-php.patch | 17 +++++++++++++++ net/hs20/patches/300-paths-in-ca-setup-sh.patch | 24 ++++++++++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 net/hs20/patches/100-fix-hs20_spp_server-path.patch create mode 100644 net/hs20/patches/200-adapt-config-php.patch create mode 100644 net/hs20/patches/300-paths-in-ca-setup-sh.patch (limited to 'net/hs20/patches') diff --git a/net/hs20/patches/100-fix-hs20_spp_server-path.patch b/net/hs20/patches/100-fix-hs20_spp_server-path.patch new file mode 100644 index 000000000..5b2f3c337 --- /dev/null +++ b/net/hs20/patches/100-fix-hs20_spp_server-path.patch @@ -0,0 +1,11 @@ +--- a/hs20/server/www/spp.php ++++ b/hs20/server/www/spp.php +@@ -141,7 +141,7 @@ $addr = $_SERVER["REMOTE_ADDR"]; + putenv("HS20ADDR=$addr"); + putenv("HS20TEST=$test"); + +-$last = exec("$osu_root/spp/hs20_spp_server -r$osu_root -f/tmp/hs20_spp_server.log", $output, $ret); ++$last = exec("/usr/sbin/hs20_spp_server -r$osu_root -f/tmp/hs20_spp_server.log", $output, $ret); + + if ($ret == 2) { + if (empty($_SERVER['PHP_AUTH_DIGEST'])) { diff --git a/net/hs20/patches/200-adapt-config-php.patch b/net/hs20/patches/200-adapt-config-php.patch new file mode 100644 index 000000000..6494bd036 --- /dev/null +++ b/net/hs20/patches/200-adapt-config-php.patch @@ -0,0 +1,17 @@ +--- a/hs20/server/www/config.php ++++ b/hs20/server/www/config.php +@@ -1,7 +1,11 @@ + diff --git a/net/hs20/patches/300-paths-in-ca-setup-sh.patch b/net/hs20/patches/300-paths-in-ca-setup-sh.patch new file mode 100644 index 000000000..5e98ac49b --- /dev/null +++ b/net/hs20/patches/300-paths-in-ca-setup-sh.patch @@ -0,0 +1,24 @@ +--- a/hs20/server/ca/setup.sh ++++ b/hs20/server/ca/setup.sh +@@ -3,7 +3,7 @@ + if [ -z "$OPENSSL" ]; then + OPENSSL=openssl + fi +-export OPENSSL_CONF=$PWD/openssl.cnf ++export OPENSSL_CONF=/usr/share/hs20/ca/openssl.cnf + PASS=whatever + if [ -z "$DOMAIN" ]; then + DOMAIN=w1.fi +@@ -83,10 +83,10 @@ then + fi + + # Set the passphrase and some other common config accordingly. +-cat openssl-root.cnf | sed "s/@PASSWORD@/$PASS/" \ ++cat /usr/share/hs20/ca/openssl-root.cnf | sed "s/@PASSWORD@/$PASS/" \ + > my-openssl-root.cnf + +-cat openssl.cnf | sed "s/@PASSWORD@/$PASS/" | ++cat /usr/share/hs20/ca/openssl.cnf | sed "s/@PASSWORD@/$PASS/" | + sed "s,@OCSP_URI@,$OCSP_URI," | + sed "s,@LOGO_URI@,$LOGO_URI," | + sed "s,@LOGO_HASH1@,$LOGO_HASH1," | -- cgit v1.2.3