From a665b206b04b1ee9a5fb40b73e1d2ffc06b11306 Mon Sep 17 00:00:00 2001 From: Aaron Bieber Date: Sun, 29 Jan 2023 05:38:34 -0700 Subject: [PATCH] switch to protect --- go.mod | 4 ++-- go.sum | 11 +++++++---- main.go | 7 ++++--- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 96ca4be..5545d1e 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,6 @@ module suah.dev/po go 1.13 require ( - github.com/qbit/gham v0.0.1 // indirect - golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 + golang.org/x/sys v0.3.0 // indirect + suah.dev/protect v1.2.1 ) diff --git a/go.sum b/go.sum index 9d188c2..02eff1f 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,7 @@ -github.com/qbit/gham v0.0.1 h1:5WrXlnsfU1HlGQigpL7akQVNZj1NOO2fsYfUkf936VE= -github.com/qbit/gham v0.0.1/go.mod h1:cQRciVbFabF/3D8jBqAZ8XEq6fOkof7XrwBbA/S7zdY= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 h1:uYVVQ9WP/Ds2ROhcaGPeIdVq0RIXVLwsHlnvJ+cT1So= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +suah.dev/protect v1.2.0 h1:4G4V43yVYXCjLFzaE9QJR0fLo3rf5vNBS9YxyoI19DU= +suah.dev/protect v1.2.0/go.mod h1:Ocn1yqUskqe/is6N2bxQxtT+fegbvQsOFyHbJAQu9XE= +suah.dev/protect v1.2.1 h1:Z0hnyMALzIEOrh0omfU5TfWVvofaujZ8/ktV8tuKW2U= +suah.dev/protect v1.2.1/go.mod h1:hB/m1oUsJfZYvbdycF1FWePCFCvCnOv2Frj/G9QA8JA= diff --git a/main.go b/main.go index 8adda92..13d308b 100644 --- a/main.go +++ b/main.go @@ -11,7 +11,7 @@ import ( "text/tabwriter" "time" - "golang.org/x/sys/unix" + "suah.dev/protect" ) var verbose bool @@ -45,8 +45,9 @@ func msg(msg interface{}) { } func main() { - unix.Unveil("", "") - unix.PledgePromises("stdio inet dns rpath") + protect.Unveil("", "") + protect.Pledge("stdio inet dns rpath") + protect.UnveilBlock() var token, userToken string var err error