From cd3b752ffeb0e1c176ff0e638ad6722d58e904ca Mon Sep 17 00:00:00 2001 From: Matt Layher Date: Wed, 17 Jan 2024 10:21:41 -0500 Subject: [PATCH] gokrazy: consrv drop privileges Signed-off-by: Matt Layher --- gokrazy/monitnerr-1/Makefile | 2 +- gokrazy/monitnerr-1/builddir/github.com/mdlayher/consrv/go.mod | 2 +- gokrazy/monitnerr-1/builddir/github.com/mdlayher/consrv/go.sum | 2 ++ gokrazy/monitnerr-1/config.tmpl.json | 3 ++- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gokrazy/monitnerr-1/Makefile b/gokrazy/monitnerr-1/Makefile index 6f889cb..d51a12a 100644 --- a/gokrazy/monitnerr-1/Makefile +++ b/gokrazy/monitnerr-1/Makefile @@ -1,4 +1,4 @@ -GOK := sed 's,"HTTPPassword": "","HTTPPassword": "$(GOKRAZY_PASSWORD)",g' config.tmpl.json > config.json && gok -i monitnerr-1 --parent_dir=/home/matt/src/github.com/mdlayher/homelab/gokrazy +GOK := sed 's,"HTTPPassword": "","HTTPPassword": "$(GOKRAZY_PASSWORD)",g' config.tmpl.json > config.json && gok -i monitnerr-1 --parent_dir=/home/mdlayher/src/github.com/mdlayher/homelab/gokrazy all: diff --git a/gokrazy/monitnerr-1/builddir/github.com/mdlayher/consrv/go.mod b/gokrazy/monitnerr-1/builddir/github.com/mdlayher/consrv/go.mod index 736cbd1..8e6b89a 100644 --- a/gokrazy/monitnerr-1/builddir/github.com/mdlayher/consrv/go.mod +++ b/gokrazy/monitnerr-1/builddir/github.com/mdlayher/consrv/go.mod @@ -21,7 +21,7 @@ require ( github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect - github.com/mdlayher/consrv v1.1.0 + github.com/mdlayher/consrv v1.1.1-0.20240117151551-4e5fe29fa49b github.com/prometheus/client_model v0.2.0 // indirect github.com/prometheus/common v0.33.0 // indirect github.com/prometheus/procfs v0.7.3 // indirect diff --git a/gokrazy/monitnerr-1/builddir/github.com/mdlayher/consrv/go.sum b/gokrazy/monitnerr-1/builddir/github.com/mdlayher/consrv/go.sum index a713366..50419b1 100644 --- a/gokrazy/monitnerr-1/builddir/github.com/mdlayher/consrv/go.sum +++ b/gokrazy/monitnerr-1/builddir/github.com/mdlayher/consrv/go.sum @@ -156,6 +156,8 @@ github.com/mdlayher/consrv v1.0.1-0.20230719000938-d8452d989341 h1:BuO4Xexnu/5zZ github.com/mdlayher/consrv v1.0.1-0.20230719000938-d8452d989341/go.mod h1:2JMSKZZSSaC15jfQM3sl9+PjQkXkNvfN7IO+OYLp4rw= github.com/mdlayher/consrv v1.1.0 h1:fNjysJ4sfojW+2+ORfa3kZ75Ka8Cdcdd3/6V93Ju3oU= github.com/mdlayher/consrv v1.1.0/go.mod h1:2JMSKZZSSaC15jfQM3sl9+PjQkXkNvfN7IO+OYLp4rw= +github.com/mdlayher/consrv v1.1.1-0.20240117151551-4e5fe29fa49b h1:8BGz0jWETqyjK/IE43IOc95kmkXaWdwaqAFGki1kYYA= +github.com/mdlayher/consrv v1.1.1-0.20240117151551-4e5fe29fa49b/go.mod h1:2JMSKZZSSaC15jfQM3sl9+PjQkXkNvfN7IO+OYLp4rw= github.com/mdlayher/metricslite v0.0.0-20220406114248-d75c70dd4887 h1:bQHlyj7L8//jVylGe6HYuTqfUweTtAqHmhuOLy6C3vs= github.com/mdlayher/metricslite v0.0.0-20220406114248-d75c70dd4887/go.mod h1:BqYH//q1ULAuVmKB/whePnSt4JCyGBV7bxZU6CjKR1s= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= diff --git a/gokrazy/monitnerr-1/config.tmpl.json b/gokrazy/monitnerr-1/config.tmpl.json index 4009b7d..272559d 100644 --- a/gokrazy/monitnerr-1/config.tmpl.json +++ b/gokrazy/monitnerr-1/config.tmpl.json @@ -27,7 +27,8 @@ }, "github.com/mdlayher/consrv/cmd/consrv": { "CommandLineFlags": [ - "-c=/etc/consrv.toml" + "-c=/etc/consrv.toml", + "-experimental-drop-privileges" ], "ExtraFilePaths": { "/etc/consrv.toml": "consrv.toml"