about summary refs log blame commit diff stats
path: root/README.md
blob: a20d5f32ca0169e051ca3197731cebe57e77a84b (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11

                                                        
<
<img src="https://pictshare.net/9dmunp.png" width=700px>

![](https://img.shields.io/github/workflow/status/mounderfod/discobra/docs?style=for-the-badge)
![](https://img.shields.io/github/stars/mounderfod/discobra?style=for-the-badge)
![](https://img.shields.io/github/issues/mounderfod/discobra?style=for-the-badge)
![](https://img.shields.io/github/issues-closed/mounderfod/discobra?style=for-the-badge)

## ⚠️ Warning

DisCobra is still in development, and is *nowhere near finished.* Do not use it in production or for anything important.
class="p">(map[string]string) // We unveil the whole cache directory. err = unix.Unveil(cache.Dir(), "rwc") if err != nil { log.Fatal(err) } unveilL["/dev/null"] = "rw" // required by feh unveilL["/etc/resolv.conf"] = "r" // ktrace output unveilL["/usr/libexec/ld.so"] = "r" unveilL["/var/run/ld.so.hints"] = "r" unveilL["/usr/lib"] = "r" unveilL["/dev/urandom"] = "r" unveilL["/etc/hosts"] = "r" unveilL["/etc/ssl"] = "r" for k, v := range unveilL { err = unix.Unveil(k, v) if err != nil && err.Error() == "no such file or directory" { log.Printf("WARN: Unveil failed on %s", k) } else if err != nil { log.Fatal(fmt.Sprintf("%s :: %s\n%s", k, v, err.Error())) } } err = unveilCmd("feh") if err != nil { log.Fatal(err) } // Block further unveil calls err = unix.UnveilBlock() if err != nil { log.Fatal(err) } } // unveilCmd will unveil commands. func unveilCmd(cmd string) error { pathList := strings.Split(getEnv("PATH", ""), ":") for _, path := range pathList { err = unix.Unveil(fmt.Sprintf("%s/%s", path, cmd), "rx") if err != nil && err.Error() != "no such file or directory" { return err } } return nil }