Repository navigation
Expand file tree
/
Copy pathfirefox-with-net-wayland.cfg
More file actions
188 lines (159 loc) · 3.18 KB
/
Copy pathfirefox-with-net-wayland.cfg
File metadata and controls
188 lines (159 loc) · 3.18 KB
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
# Example config for nsjail
name: "firefox-with-net-wayland"
description: "This policy allows to run firefox inside a jail. Access to networking is "
description: "permitted with this setup (via pasta)."
description: ""
description: "The only permitted home directory is $HOME/.mozilla and $HOME/Documents."
description: "The rest of available on the FS files/dires are libs and X-related files/dirs."
description: ""
description: "Run as:"
description: ""
description: "./nsjail --config configs/firefox-with-net-wayland.cfg"
description: ""
description: "You can then go to https://uploadfiles.io/ and try to upload a file in order"
description: "to see how your local directory (also, all system directories) look like."
mode: ONCE
hostname: "FIREFOX"
cwd: "/user"
time_limit: 0
clone_newnet: true
user_net { }
envar: "HOME=/user"
envar: "TMP=/tmp"
envar: "FONTCONFIG_FILE=/etc/fonts/fonts.conf"
envar: "FC_CONFIG_FILE=/etc/fonts/fonts.conf"
envar: "MOZ_ENABLE_WAYLAND=1"
envar: "XDG_RUNTIME_DIR=/run/user/1000"
envar: "WAYLAND_DISPLAY"
rlimit_as: 262144
rlimit_cpu: 1000
rlimit_fsize: 1024
rlimit_nofile: 1024
uidmap {
inside_id: "1000"
}
gidmap {
inside_id: "1000"
}
mount {
dst: "/proc"
fstype: "proc"
rw: true
}
mount {
src: "/lib"
dst: "/lib"
is_bind: true
}
mount {
src: "/usr/lib"
dst: "/usr/lib"
is_bind: true
}
mount {
src: "/lib64"
dst: "/lib64"
is_bind: true
mandatory: false
}
mount {
src: "/lib32"
dst: "/lib32"
is_bind: true
mandatory: false
}
mount {
src: "/usr/share"
dst: "/usr/share"
is_bind: true
}
mount {
src_content: "<?xml version=\"1.0\"?>\n<!DOCTYPE fontconfig SYSTEM \"fonts.dtd\">\n<fontconfig><dir>/usr/share/fonts</dir><cachedir>/tmp/fontconfig</cachedir></fontconfig>"
dst: "/etc/fonts/fonts.conf"
}
mount {
src: "/dev/urandom"
dst: "/dev/urandom"
is_bind: true
rw: true
}
mount {
src: "/dev/null"
dst: "/dev/null"
is_bind: true
rw: true
}
mount {
src_content: "nameserver 8.8.8.8\n"
dst: "/etc/resolv.conf"
}
mount {
dst: "/tmp"
fstype: "tmpfs"
rw: true
is_bind: false
}
mount {
dst: "/dev/shm"
fstype: "tmpfs"
rw: true
is_bind: false
}
mount {
dst: "/user"
fstype: "tmpfs"
rw: true
}
mount {
prefix_src_env: "HOME"
src: "/Documents"
dst: "/user/Documents"
rw: true
is_bind: true
mandatory: false
}
mount {
dst: "/user/.mozilla"
fstype: "tmpfs"
rw: true
is_bind: false
}
# Uncomment, if you want your config to be loaded
# mount {
# prefix_src_env: "HOME"
# src: "/.mozilla"
# dst: "/user/.mozilla"
# is_bind: true
# rw: true
# mandatory: false
#}
mount {
# Change it to your user id
src: "/run/user/1000/wayland-0"
dst: "/run/user/1000/wayland-0"
is_bind: true
rw: true
}
mount {
# Change it to your user id
src: "/run/user/1000/pulse/native"
dst: "/run/user/1000/pulse/native"
is_bind: true
rw: false
mandatory: false
}
seccomp_string: "KILL_PROCESS {"
seccomp_string: " ptrace,"
seccomp_string: " process_vm_readv,"
seccomp_string: " process_vm_writev"
seccomp_string: "}"
seccomp_string: "ERRNO(38) {"
seccomp_string: " io_uring_setup,"
seccomp_string: " io_uring_enter,"
seccomp_string: " io_uring_register"
seccomp_string: "}"
seccomp_string: "DEFAULT ALLOW"
exec_bin {
path: "/usr/lib/firefox/firefox"
arg: "-private"
}