diff mbox series

[4/9] hs20-spp-html: apache + systemd hides the log file.

Message ID 20200207091017.26244-4-greearb@candelatech.com
State Changes Requested
Headers show
Series [1/9] supplicant: Update HS20 readme. | expand

Commit Message

Ben Greear Feb. 7, 2020, 9:10 a.m. UTC
From: Ben Greear <greearb@candelatech.com>

Add note so that the user has a chance to find it more easily.

Signed-off-by: Ben Greear <greearb@candelatech.com>
---
 hs20/server/www/spp.php | 3 +++
 1 file changed, 3 insertions(+)

Comments

Jouni Malinen Feb. 16, 2020, 2:06 p.m. UTC | #1
On Fri, Feb 07, 2020 at 01:10:12AM -0800, greearb@candelatech.com wrote:
> Add note so that the user has a chance to find it more easily.

> diff --git a/hs20/server/www/spp.php b/hs20/server/www/spp.php
> @@ -141,6 +141,9 @@ $addr = $_SERVER["REMOTE_ADDR"];
>  putenv("HS20ADDR=$addr");
>  putenv("HS20TEST=$test");
>  
> +// Note that systemd + apache may run under chroot, and so your log file will
> +// be in some hard-to-find place like:
> +// /tmp/systemd-httpd.service-XqgPdBa/tmp/hs20_spp_server.log
>  $last = exec("$osu_root/spp/hs20_spp_server -r$osu_root -f/tmp/hs20_spp_server.log", $output, $ret);

Isn't that PHP file a bit strange place for such comment if this is
supposed to help the operator to find the log file?
hs20/server/sh20-osu-server.txt would look like a more helpful location
for documenting such behavior.
diff mbox series

Patch

diff --git a/hs20/server/www/spp.php b/hs20/server/www/spp.php
index c56d3d69e..77a2ebb44 100644
--- a/hs20/server/www/spp.php
+++ b/hs20/server/www/spp.php
@@ -141,6 +141,9 @@  $addr = $_SERVER["REMOTE_ADDR"];
 putenv("HS20ADDR=$addr");
 putenv("HS20TEST=$test");
 
+// Note that systemd + apache may run under chroot, and so your log file will
+// be in some hard-to-find place like:
+// /tmp/systemd-httpd.service-XqgPdBa/tmp/hs20_spp_server.log
 $last = exec("$osu_root/spp/hs20_spp_server -r$osu_root -f/tmp/hs20_spp_server.log", $output, $ret);
 
 if ($ret == 2) {