From 206a776f64c9163ab597c25a61040c08c012dfd0 Mon Sep 17 00:00:00 2001 From: Andinus Date: Sat, 4 Apr 2020 21:59:01 +0530 Subject: Fix unveil rules --- cmd/cetus/main_openbsd.go | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'cmd') diff --git a/cmd/cetus/main_openbsd.go b/cmd/cetus/main_openbsd.go index 42aecaf..a140071 100644 --- a/cmd/cetus/main_openbsd.go +++ b/cmd/cetus/main_openbsd.go @@ -19,27 +19,22 @@ func main() { func unveil() { unveilL := make(map[string]string) - unveilL[cache.GetDir()] = "rwc" - unveilL["/dev/null"] = "rw" // required by feh + // 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/libpthread.so.26.1"] = "r" - unveilL["/usr/lib/libc.so.95.1"] = "r" + unveilL["/usr/lib"] = "r" unveilL["/dev/urandom"] = "r" - unveilL["/etc/mdns.allow"] = "r" unveilL["/etc/hosts"] = "r" - unveilL["/usr/local/etc/ssl/cert.pem"] = "r" - unveilL["/etc/ssl/cert.pem"] = "r" - unveilL["/etc/ssl/certs"] = "r" - unveilL["/system/etc/security/cacerts"] = "r" - unveilL["/usr/local/share/certs"] = "r" - unveilL["/etc/pki/tls/certs"] = "r" - unveilL["/etc/openssl/certs"] = "r" - unveilL["/var/ssl/certs"] = "r" + unveilL["/etc/ssl"] = "r" for k, v := range unveilL { err = unix.Unveil(k, v) -- cgit 1.4.1-2-gfad0 _server_events.c?id=87bf85c40bf495f6df7236f587307cd49e86ed5a'>tree commit diff stats
path: root/tests/unittests/test_server_events.c
blob: 4ecedace063781c86eacd26f180f648b3222853b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125