nsjail/configs/home-documents-with-xorg-no-net.cfg

151 lines
2.0 KiB
INI
Raw Normal View History

# Example config for nsjail
2017-05-28 02:47:42 +08:00
name: "documents-with-xorg"
description: "This policy allows to run many X-org based tool, which are allowed"
description: "to access $HOME/Documents directory only. An example of use is:"
description: ""
description: "./nsjail --config configs/documents-with-xorg.cfg -- \\"
description: " /usr/bin/geeqie /user/Documents/"
description: ""
description: "What is more, this policy doesn't allow to access networking."
2017-05-28 02:47:42 +08:00
mode: ONCE
hostname: "NSJAIL"
2017-05-28 21:15:48 +08:00
cwd: "/user"
2017-05-28 02:47:42 +08:00
time_limit: 1000
envar: "DISPLAY"
envar: "HOME=/user"
2017-05-28 07:30:26 +08:00
envar: "TMP=/tmp"
2017-05-28 02:47:42 +08:00
rlimit_as: 2048
2017-05-28 02:47:42 +08:00
rlimit_cpu: 1000
2017-05-28 03:54:01 +08:00
rlimit_fsize: 1024
2017-05-28 02:47:42 +08:00
rlimit_nofile: 16
mount {
src: "/lib"
dst: "/lib"
is_bind: true
}
mount {
src: "/lib64"
dst: "/lib64"
is_bind: true
mandatory: false
}
mount {
src: "/lib32"
dst: "/lib32"
is_bind: true
mandatory: false
}
2017-05-28 02:47:42 +08:00
mount {
src: "/bin"
dst: "/bin"
is_bind: true
}
mount {
src: "/usr/bin"
dst: "/usr/bin"
2017-05-28 02:47:42 +08:00
is_bind: true
}
mount {
src: "/usr/share"
dst: "/usr/share"
2017-05-28 02:47:42 +08:00
is_bind: true
}
mount {
src: "/usr/lib"
dst: "/usr/lib"
is_bind: true
}
mount {
src: "/usr/lib64"
dst: "/usr/lib64"
2017-05-28 02:47:42 +08:00
is_bind: true
mandatory: false
}
mount {
src: "/usr/lib32"
dst: "/usr/lib32"
2017-05-28 02:47:42 +08:00
is_bind: true
mandatory: false
}
mount {
dst: "/tmp"
fstype: "tmpfs"
2017-05-28 07:24:55 +08:00
rw: true
2017-05-28 02:47:42 +08:00
}
2017-06-20 09:14:09 +08:00
mount {
dst: "/dev/shm"
fstype: "tmpfs"
rw: true
}
2017-05-28 02:47:42 +08:00
mount {
dst: "/user"
fstype: "tmpfs"
2017-05-28 07:24:55 +08:00
rw: true
2017-05-28 02:47:42 +08:00
}
2017-05-28 03:54:01 +08:00
mount {
prefix_src_env: "HOME"
src: "/Documents"
dst: "/user/Documents"
is_bind: true
2017-05-28 03:54:01 +08:00
}
2017-05-28 02:47:42 +08:00
mount {
src: "/tmp/.X11-unix"
dst: "/tmp/.X11-unix"
2017-05-28 02:47:42 +08:00
is_bind: true
rw: true
2017-05-28 02:47:42 +08:00
}
mount {
src: "/dev/null"
dst: "/dev/null"
is_bind: true
rw: true
}
2019-01-21 04:41:10 +08:00
mount {
src: "/dev/random"
dst: "/dev/random"
is_bind: true
rw: true
}
mount {
src: "/dev/urandom"
dst: "/dev/urandom"
is_bind: true
rw: true
}
2017-05-28 02:47:42 +08:00
mount {
src: "/etc/passwd"
dst: "/etc/passwd"
is_bind: true
}
seccomp_string: "KILL_PROCESS {"
seccomp_string: " ptrace,"
seccomp_string: " process_vm_readv,"
seccomp_string: " process_vm_writev"
2017-09-27 21:49:12 +08:00
seccomp_string: "}"
seccomp_string: "DEFAULT ALLOW"