7 Commits

Author SHA1 Message Date
Michael Stapelberg
b93a58e5c8 status: print module info details
fixes https://github.com/gokrazy/gokrazy/issues/59
2020-05-30 18:17:38 +02:00
Michael Stapelberg
32f88999da set HOME=/perm/$basename when starting services
Previously, HOME was inherited from the environment of the init process, which
has HOME=/ set. Of course, / is not writable on gokrazy, so this change makes
things less strict and should therefore not break any deployments.
2020-05-27 18:50:52 +02:00
Michael Stapelberg
6beb2e16aa implement remote syslog as a platform feature
To configure, run the following command in an interactive shell (e.g. via
breakglass, or when mounting the permanent partition of the SD card on the
host):

  mkdir /perm/remote_syslog
  echo 10.0.0.76:514 > /perm/remote_syslog/target

I recommend using a (static) IP address for increased reliability, so that
remote syslog works even when DNS does not.

fixes #50
2019-12-10 22:15:42 +01:00
Michael Stapelberg
c74265523b implement XSRF/CSRF protection for /stop and /restart
While stopping/restarting processes seems like a nuisance at best, it’s good
style to prevent these attacks.

This commit the Double-Submit Cookie protection, which seems appropriate for our
architecture and demands. See also:
https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)_Prevention_Cheat_Sheet#Double_Submit_Cookie
2018-06-25 18:38:08 +02:00
Michael Stapelberg
7dc7a36757 supervise: refactor to use one HTTP handler 2018-06-25 18:27:23 +02:00
Michael Stapelberg
91da7026f8 reboot: send SIGTERM to processes, wait for 1s
This way, programs can flush state to permanent storage if they need to.
2018-06-17 08:53:19 +02:00
Michael Stapelberg
38af7fd18d Initial commit 2017-03-04 11:22:48 +01:00