summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main.go7
-rw-r--r--unveil.go3
2 files changed, 7 insertions, 3 deletions
diff --git a/main.go b/main.go
index 60112d8..628925a 100644
--- a/main.go
+++ b/main.go
@@ -23,11 +23,16 @@ func main() {
if err := UnveilPaths([]string{
c.Dirs.Static,
c.Repo.ScanPath,
- c.Dirs.Templates},
+ c.Dirs.Templates,
+ },
"r"); err != nil {
log.Fatalf("unveil: %s", err)
}
+ if err := Unveil("/usr/local/bin/git", "rx"); err != nil {
+ log.Fatalf("unveil: %s", err)
+ }
+
mux := routes.Handlers(c)
addr := fmt.Sprintf("%s:%d", c.Server.Host, c.Server.Port)
log.Println("starting server on", addr)
diff --git a/unveil.go b/unveil.go
index 9fe5e10..3b4803e 100644
--- a/unveil.go
+++ b/unveil.go
@@ -20,8 +20,7 @@ func UnveilBlock() error {
func UnveilPaths(paths []string, perms string) error {
for _, path := range paths {
- err := Unveil(path, perms)
- if err != nil {
+ if err := Unveil(path, perms); err != nil {
return err
}
}