web frontend for git (tangled's grandpa)
7
fork

Configure Feed

Select the types of activity you want to include in your feed.

unveil: init

+37
+4
main.go
··· 20 20 log.Fatal(err) 21 21 } 22 22 23 + // for path := range []string{c.Dirs.Static, c.Repo.ScanPath, c.Dirs.Templates} { 24 + // Unveil(path, "r") 25 + // } 26 + 23 27 mux := routes.Handlers(c) 24 28 addr := fmt.Sprintf("%s:%d", c.Server.Host, c.Server.Port) 25 29 log.Println("starting server on", addr)
+5
static/style.css
··· 210 210 211 211 .line-numbers { 212 212 white-space: pre-line; 213 + -moz-user-select: -moz-none; 214 + -khtml-user-select: none; 215 + -webkit-user-select: none; 216 + -o-user-select: none; 217 + user-select: none; 213 218 } 214 219 215 220 .file-wrapper {
+28
unveil.go
··· 1 + //go:build openbsd 2 + // +build openbsd 3 + 4 + package main 5 + 6 + /* 7 + #include <stdlib.h> 8 + #include <unistd.h> 9 + */ 10 + import "C" 11 + 12 + import ( 13 + "fmt" 14 + "unsafe" 15 + ) 16 + 17 + func Unveil(path string, perms string) error { 18 + cpath := C.CString(path) 19 + defer C.free(unsafe.Pointer(cpath)) 20 + cperms := C.CString(perms) 21 + defer C.free(unsafe.Pointer(cperms)) 22 + 23 + rv, err := C.unveil(cpath, cperms) 24 + if rv != 0 { 25 + return fmt.Errorf("unveil(%s, %s) failure (%d)", path, perms, err) 26 + } 27 + return nil 28 + }