aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--RELNOTES1
-rwxr-xr-xcontrib/firejail-welcome.sh119
2 files changed, 120 insertions, 0 deletions
diff --git a/RELNOTES b/RELNOTES
index 9fa72d1d4..4eda50bc8 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -2,6 +2,7 @@ firejail (0.9.65) baseline; urgency=low
2 * allow --tmpfs inside $HOME for unprivileged users 2 * allow --tmpfs inside $HOME for unprivileged users
3 * --disable-usertmpfs compile time option 3 * --disable-usertmpfs compile time option
4 * allow AF_BLUETOOTH via --protocol=bluetooth 4 * allow AF_BLUETOOTH via --protocol=bluetooth
5 * Setup guide for new users: contrib/firejail-welcome.sh
5 * new profiles: spectacle, chromium-browser-privacy, gtk-straw-viewer 6 * new profiles: spectacle, chromium-browser-privacy, gtk-straw-viewer
6 * new profiles: gtk-youtube-viewer, gtk2-youtube-viewer, gtk3-youtube-viewer 7 * new profiles: gtk-youtube-viewer, gtk2-youtube-viewer, gtk3-youtube-viewer
7 * new profiles: straw-viewer, lutris, dolphin-emu, authenticator-rs 8 * new profiles: straw-viewer, lutris, dolphin-emu, authenticator-rs
diff --git a/contrib/firejail-welcome.sh b/contrib/firejail-welcome.sh
new file mode 100755
index 000000000..21425562d
--- /dev/null
+++ b/contrib/firejail-welcome.sh
@@ -0,0 +1,119 @@
1#!/bin/bash
2
3# This file is part of Firejail project
4# Copyright (C) 2014-2020 Firejail Authors
5# License GPL v2
6
7export LANG=en_US.UTF8
8
9zenity --title=firejail-welcome.sh --text-info --width=750 --height=500 <<EOM
10Welcome to firejail!
11
12This is a quick setup guide for newbies.
13
14Profiles for programs can be found in /etc/firejail. Own customizations should go in a file named
15<proile-name>.local in ~/.config/firejal.
16
17Firejails own configuration can be found at /etc/firejail/firejail.config.
18
19Please note that running this script a second time can set new options, but does not unset options
20set in a previous run.
21
22Webiste: https://firejail.wordpress.com
23Bug-Tracker: https://github.com/netblue30/firejail/issues
24Documentation:
25- https://github.com/netblue30/firejail/wiki
26- https://github.com/netblue30/firejail/wiki/Frequently-Asked-Questions
27- https://firejail.wordpress.com/documentation-2
28- man:firejail(1) and man:firejail-profile(5)
29
30PS: If you have any improvements for this script, open a issues or pull request.
31EOM
32[[ $? -eq 1 ]] && exit 0
33
34sed_scripts=()
35
36read -r -d $'\0' MSG_Q_BROWSER_DISABLE_U2F <<EOM
37<big><b>Should browsers be allowed to access u2f hardware?</b></big>
38EOM
39
40read -r -d $'\0' MSG_Q_BROWSER_ALLOW_DRM <<EOM
41<big><b>Should browsers be able to play DRM content?</b></big>
42
43\$HOME is noexec,nodev,nosuid by default for the most sandboxes. This means that executing ELFs which are located in \$HOME,
44is forbidden, the setuid attribute on files is ignored and device files inside \$HOME don't work. Browsers install proprietary
45DRM plug-ins such as Widevine under \$HOME by default. In order to use them, \$HOME must be mounted exec inside the sandbox to
46allow there execution. Clearly, this may help an attacker to start malicious code.
47
48NOTE: Other software written in an interpreter language such as bash, python or java can always started from \$HOME.
49
50TIPP: If <tt>/home</tt> has its own partition, you can mount it <tt>nodev,nosuid</tt> for all programs.
51EOM
52
53read -r -d $'\0' MSG_L_ADVANCED_OPTIONS <<EOM
54You maybe want to set some of these advanced options.
55EOM
56
57read -r -d $'\0' MSG_Q_RUN_FIRECFG <<EOM
58<big><b>Should the most programs started in firejail by default?</b></big>
59EOM
60
61read -r -d $'\0' MSG_I_ROOT_REQUIRED <<EOM
62In order to apply these changes, root right are required.
63You will now be asked to enter your password.
64EOM
65
66read -r -d $'\0' MSG_I_FINISH <<EOM
67🥳
68EOM
69
70if zenity --title=firejail-welcome.sh --question --ellipsize --text="$MSG_Q_BROWSER_DISABLE_U2F"; then
71 sed_scripts+=("-e s/# browser-disable-u2f yes/browser-disable-u2f no/")
72fi
73
74if zenity --title=firejail-welcome.sh --question --ellipsize --text="$MSG_Q_BROWSER_ALLOW_DRM"; then
75 sed_scripts+=("-e s/# browser-allow-drm no/browser-allow-drm yes/")
76fi
77
78advanced_options=$(zenity --title=firejail-welcome.sh --list --width=800 --height=200 \
79 --text="$MSG_L_ADVANCED_OPTIONS" --multiple --checklist --separator=" " \
80 --column="" --column=Option --column=Description <<EOM
81
82force-nonewprivs
83Always set nonewprivs, this is a strong mitigation against exploits in firejail. However some programs like chromium or wireshark maybe don't work anymore.
84
85restricted-network
86Restrict all network related commands except 'net none' to root only.
87
88seccomp-error-action=kill
89Kill programs which violate seccomp rules (default: return a error).
90EOM
91)
92
93if [[ $advanced_options == *force-nonewprivs* ]]; then
94 sed_scripts+=("-e s/# force-nonewprivs no/force-nonewprivs yes/")
95fi
96if [[ $advanced_options == *restricted-network* ]]; then
97 sed_scripts+=("-e s/# restricted-network no/restricted-network yes/")
98fi
99if [[ $advanced_options == *seccomp-error-action=kill* ]]; then
100 sed_scripts+=("-e s/# seccomp-error-action EPERM/seccomp-error-action kill/")
101fi
102
103if zenity --title=firejail-welcome.sh --question --ellipsize --text="$MSG_Q_RUN_FIRECFG"; then
104 run_firecfg=true
105fi
106
107zenity --title=firejail-welcome.sh --info --ellipsize --text="$MSG_I_ROOT_REQUIRED"
108
109passwd=$(zenity --title=firejail-welcome.sh --password --cancel-label=OK)
110if [[ -n "${sed_scripts[*]}" ]]; then
111 sudo -S -p "" -- sed -i "${sed_scripts[@]}" /etc/firejail/firejail.config <<<"$passwd" || { zenity --title=firejail-welcome.sh --error; exit 1; };
112fi
113if [[ "$run_firecfg" == "true" ]]; then
114 sudo -S -p "" -- firecfg <<<"$passwd" || { zenity --title=firejail-welcome.sh --error; exit 1; };
115fi
116sudo -k
117unset passwd
118
119zenity --title=firejail-welcome.sh --info --icon-name=security-medium-symbolic --text="$MSG_I_FINISH"