unveil: add git executable
This commit is contained in:
parent
0ed4b29fe0
commit
6e6648e344
2 changed files with 7 additions and 3 deletions
7
main.go
7
main.go
|
@ -23,11 +23,16 @@ func main() {
|
||||||
if err := UnveilPaths([]string{
|
if err := UnveilPaths([]string{
|
||||||
c.Dirs.Static,
|
c.Dirs.Static,
|
||||||
c.Repo.ScanPath,
|
c.Repo.ScanPath,
|
||||||
c.Dirs.Templates},
|
c.Dirs.Templates,
|
||||||
|
},
|
||||||
"r"); err != nil {
|
"r"); err != nil {
|
||||||
log.Fatalf("unveil: %s", err)
|
log.Fatalf("unveil: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if err := Unveil("/usr/local/bin/git", "rx"); err != nil {
|
||||||
|
log.Fatalf("unveil: %s", err)
|
||||||
|
}
|
||||||
|
|
||||||
mux := routes.Handlers(c)
|
mux := routes.Handlers(c)
|
||||||
addr := fmt.Sprintf("%s:%d", c.Server.Host, c.Server.Port)
|
addr := fmt.Sprintf("%s:%d", c.Server.Host, c.Server.Port)
|
||||||
log.Println("starting server on", addr)
|
log.Println("starting server on", addr)
|
||||||
|
|
|
@ -20,8 +20,7 @@ func UnveilBlock() error {
|
||||||
|
|
||||||
func UnveilPaths(paths []string, perms string) error {
|
func UnveilPaths(paths []string, perms string) error {
|
||||||
for _, path := range paths {
|
for _, path := range paths {
|
||||||
err := Unveil(path, perms)
|
if err := Unveil(path, perms); err != nil {
|
||||||
if err != nil {
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue