<commit_before># Example config for nsjail

name: "firefox-with-net"

description: "This policy allows to run firefox inside a jail. Access to networking is"
description: "permitted with this setup (clone_newnet: false)."
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: false

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=/user/run/"
envar: "WAYLAND_DISPLAY=wayland-0"

rlimit_as: 4096
rlimit_cpu: 1000
rlimit_fsize: 1024
rlimit_nofile: 512<commit_msg>configs/firefox-with-net-wayland.cfg: retain original WAYLAND_DISPLAY value<commit_after># Example config for nsjail

name: "firefox-with-net"

description: "This policy allows to run firefox inside a jail. Access to networking is"
description: "permitted with this setup (clone_newnet: false)."
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: false

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=/user/run/"
envar: "WAYLAND_DISPLAY"

rlimit_as: 4096
rlimit_cpu: 1000
rlimit_fsize: 1024
rlimit_nofile: 512
{'fraction_non_alphanumeric': 0.11759656652360514, 'fraction_numerical': 0.015021459227467811, 'mean_word_length': 5.529411764705882, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5546662', 'n_tokens_mistral': 846, 'n_tokens_neox': 783, 'n_words': 249}