diff --git a/platform/rpm/firejail.spec b/platform/rpm/firejail.spec index 9fe35e528..76d19ba17 100644 --- a/platform/rpm/firejail.spec +++ b/platform/rpm/firejail.spec @@ -19,7 +19,7 @@ using Linux namespaces. It includes a sandbox profile for Mozilla Firefox. %setup -q %build -%configure --disable-userns +%configure --disable-userns --disable-contrib-install make %{?_smp_mflags} %install @@ -46,4 +46,4 @@ rm -rf %{buildroot} %{_mandir}/man5/__NAME__-login.5.gz %{_mandir}/man5/__NAME__-profile.5.gz %{_mandir}/man5/__NAME__-users.5.gz -%config %{_sysconfdir}/__NAME__ +%config(noreplace) %{_sysconfdir}/__NAME__ diff --git a/test/apps-x11-xorg/apps-x11-xorg.sh b/test/apps-x11-xorg/apps-x11-xorg.sh index 32331f786..ea07d3713 100755 --- a/test/apps-x11-xorg/apps-x11-xorg.sh +++ b/test/apps-x11-xorg/apps-x11-xorg.sh @@ -6,7 +6,7 @@ export MALLOC_CHECK_=3 export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) -which firefox +which firefox 2>/dev/null if [ "$?" -eq 0 ]; then echo "TESTING: firefox x11 xorg" @@ -15,7 +15,7 @@ else echo "TESTING SKIP: firefox not found" fi -which transmission-gtk +which transmission-gtk 2>/dev/null if [ "$?" -eq 0 ]; then echo "TESTING: transmission-gtk x11 xorg" @@ -24,7 +24,7 @@ else echo "TESTING SKIP: transmission-gtk not found" fi -which thunderbird +which thunderbird 2>/dev/null if [ "$?" -eq 0 ]; then echo "TESTING: thunderbird x11 xorg" diff --git a/test/apps-x11/apps-x11.sh b/test/apps-x11/apps-x11.sh index 2e0031dd9..c12b11f3e 100755 --- a/test/apps-x11/apps-x11.sh +++ b/test/apps-x11/apps-x11.sh @@ -10,20 +10,20 @@ echo "TESTING: no x11 (test/apps-x11/x11-none.exp)" ./x11-none.exp -which xterm +which xterm 2>/dev/null if [ "$?" -eq 0 ]; then echo "TESTING: xterm x11 xorg" ./xterm-xorg.exp - which xpra + which xpra 2>/dev/null if [ "$?" -eq 0 ]; then echo "TESTING: xterm x11 xpra" ./xterm-xpra.exp fi - which Xephyr + which Xephyr 2>/dev/null if [ "$?" -eq 0 ]; then echo "TESTING: xterm x11 xephyr" @@ -34,13 +34,13 @@ else fi # check xpra/xephyr -which xpra +which xpra 2>/dev/null if [ "$?" -eq 0 ]; then echo "xpra found" else echo "xpra not found" - which Xephyr + which Xephyr 2>/dev/null if [ "$?" -eq 0 ]; then echo "Xephyr found" @@ -50,7 +50,7 @@ else fi fi -which firefox +which firefox 2>/dev/null if [ "$?" -eq 0 ]; then echo "TESTING: firefox x11" @@ -59,7 +59,7 @@ else echo "TESTING SKIP: firefox not found" fi -which chromium +which chromium 2>/dev/null if [ "$?" -eq 0 ]; then echo "TESTING: chromium x11" @@ -68,7 +68,7 @@ else echo "TESTING SKIP: chromium not found" fi -which transmission-gtk +which transmission-gtk 2>/dev/null if [ "$?" -eq 0 ]; then echo "TESTING: transmission-gtk x11" @@ -77,7 +77,7 @@ else echo "TESTING SKIP: transmission-gtk not found" fi -which thunderbird +which thunderbird 2>/dev/null if [ "$?" -eq 0 ]; then echo "TESTING: thunderbird x11" diff --git a/test/apps/apps.sh b/test/apps/apps.sh index 4e0a9cc08..a3d0c4dc7 100755 --- a/test/apps/apps.sh +++ b/test/apps/apps.sh @@ -10,7 +10,7 @@ LIST="firefox midori chromium opera transmission-qt qbittorrent uget-gtk filezil LIST+="vlc fbreader deluge gnome-mplayer xchat wine kcalc ktorrent hexchat" for app in $LIST; do - which $app + which $app 2>/dev/null if [ "$?" -eq 0 ]; then echo "TESTING: $app" diff --git a/test/arguments/arguments.sh b/test/arguments/arguments.sh index 049236900..9500b5975 100755 --- a/test/arguments/arguments.sh +++ b/test/arguments/arguments.sh @@ -4,9 +4,8 @@ if [ -f /etc/debian_version ]; then libdir=$(dirname "$(dpkg -L firejail | grep faudit)") export PATH="$PATH:$libdir" else - export PATH="$PATH:/usr/lib/firejail" + export PATH="$PATH:/usr/lib/firejail:/usr/lib64/firejail" fi -export PATH="$PATH:/usr/lib/firejail" echo "TESTING: 1. regular bash session" ./bashrun.exp diff --git a/test/environment/environment.sh b/test/environment/environment.sh index 364a4b65b..97ba8ba58 100755 --- a/test/environment/environment.sh +++ b/test/environment/environment.sh @@ -38,7 +38,7 @@ echo "TESTING: environment variables (test/environment/env.exp)" echo "TESTING: shell none(test/environment/shell-none.exp)" ./shell-none.exp -which dash +which dash 2>/dev/null if [ "$?" -eq 0 ]; then echo "TESTING: dash (test/environment/dash.exp)" @@ -47,7 +47,7 @@ else echo "TESTING SKIP: dash not found" fi -which csh +which csh 2>/dev/null if [ "$?" -eq 0 ]; then echo "TESTING: csh (test/environment/csh.exp)" @@ -56,7 +56,7 @@ else echo "TESTING SKIP: csh not found" fi -which zsh +which zsh 2>/dev/null if [ "$?" -eq 0 ]; then echo "TESTING: zsh (test/environment/zsh.exp)" @@ -68,7 +68,7 @@ fi echo "TESTING: firejail in firejail - single sandbox (test/environment/firejail-in-firejail.exp)" ./firejail-in-firejail.exp -which aplay +which aplay 2>/dev/null if [ "$?" -eq 0 ]; then echo "TESTING: sound (test/environment/sound.exp)" @@ -83,7 +83,7 @@ echo "TESTING: nice (test/environment/nice.exp)" echo "TESTING: quiet (test/environment/quiet.exp)" ./quiet.exp -which strace +which strace 2>/dev/null if [ "$?" -eq 0 ]; then echo "TESTING: --allow-debuggers (test/environment/allow-debuggers.exp)" diff --git a/test/fcopy/fcopy.sh b/test/fcopy/fcopy.sh index 0e7cb2e5e..b225f9ea0 100755 --- a/test/fcopy/fcopy.sh +++ b/test/fcopy/fcopy.sh @@ -11,7 +11,7 @@ if [ -f /etc/debian_version ]; then export PATH="$PATH:$libdir" fi -export PATH="$PATH:/usr/lib/firejail" +export PATH="$PATH:/usr/lib/firejail:/usr/lib64/firejail" mkdir dest diff --git a/test/filters/filters.sh b/test/filters/filters.sh index 97ecc8be0..ff197aa54 100755 --- a/test/filters/filters.sh +++ b/test/filters/filters.sh @@ -10,11 +10,9 @@ if [ -f /etc/debian_version ]; then libdir=$(dirname "$(dpkg -L firejail | grep fseccomp)") export PATH="$PATH:$libdir" else - export PATH="$PATH:/usr/lib/firejail" + export PATH="$PATH:/usr/lib/firejail:/usr/lib64/firejail" fi -export PATH="$PATH:/usr/lib/firejail" - if [ "$(uname -m)" = "x86_64" ]; then echo "TESTING: memory-deny-write-execute (test/filters/memwrexe.exp)" ./memwrexe.exp @@ -79,7 +77,7 @@ echo "TESTING: seccomp errno (test/filters/seccomp-errno.exp)" echo "TESTING: seccomp su (test/filters/seccomp-su.exp)" ./seccomp-su.exp -which strace +which strace 2>/dev/null if [ $? -eq 0 ]; then echo "TESTING: seccomp ptrace (test/filters/seccomp-ptrace.exp)" ./seccomp-ptrace.exp diff --git a/test/fnetfilter/fnetfilter.sh b/test/fnetfilter/fnetfilter.sh index bae952ee9..aa2eb707a 100755 --- a/test/fnetfilter/fnetfilter.sh +++ b/test/fnetfilter/fnetfilter.sh @@ -11,7 +11,7 @@ if [ -f /etc/debian_version ]; then export PATH="$PATH:$libdir" fi -export PATH="$PATH:/usr/lib/firejail" +export PATH="$PATH:/usr/lib/firejail:/usr/lib64/firejail" chmod 400 outlocked diff --git a/test/overlay/overlay.sh b/test/overlay/overlay.sh index 6b7f779d7..9daf1f5f6 100755 --- a/test/overlay/overlay.sh +++ b/test/overlay/overlay.sh @@ -21,7 +21,7 @@ rm -fr ~/_firejail_test_* ./fs-tmpfs.exp rm -fr ~/_firejail_test_* -which firefox +which firefox 2>/dev/null if [ "$?" -eq 0 ]; then echo "TESTING: overlay firefox" @@ -30,7 +30,7 @@ else echo "TESTING SKIP: firefox not found" fi -which firefox +which firefox 2>/dev/null if [ "$?" -eq 0 ]; then echo "TESTING: overlay firefox x11 xorg" @@ -41,13 +41,13 @@ fi # check xpra/xephyr -which xpra +which xpra 2>/dev/null if [ "$?" -eq 0 ]; then echo "xpra found" else echo "xpra not found" - which Xephyr + which Xephyr 2>/dev/null if [ "$?" -eq 0 ]; then echo "Xephyr found" @@ -57,7 +57,7 @@ else fi fi -which firefox +which firefox 2>/dev/null if [ "$?" -eq 0 ]; then echo "TESTING: overlay firefox x11" diff --git a/test/private-lib/private-lib.sh b/test/private-lib/private-lib.sh index 312fe502a..2a0eb8d30 100755 --- a/test/private-lib/private-lib.sh +++ b/test/private-lib/private-lib.sh @@ -9,7 +9,7 @@ LIST="evince galculator gnome-calculator leafpad mousepad transmission-gtk xcalc for app in $LIST; do - which $app + which $app 2>/dev/null if [ "$?" -eq 0 ]; then echo "TESTING: private-lib $app" diff --git a/test/root/root.sh b/test/root/root.sh index 4f217b727..a20142c5f 100755 --- a/test/root/root.sh +++ b/test/root/root.sh @@ -7,7 +7,7 @@ #******************************** # firecfg #******************************** -which less +which less 2>/dev/null if [ "$?" -eq 0 ]; then echo "TESTING: firecfg (test/root/firecfg.exp)" diff --git a/test/sysutils/sysutils.sh b/test/sysutils/sysutils.sh index dd09e4533..6794af520 100755 --- a/test/sysutils/sysutils.sh +++ b/test/sysutils/sysutils.sh @@ -6,7 +6,7 @@ export MALLOC_CHECK_=3 export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) -which cpio +which cpio 2>/dev/null if [ "$?" -eq 0 ]; then echo "TESTING: cpio" @@ -24,7 +24,7 @@ fi # echo "TESTING SKIP: strings not found" #fi -which gzip +which gzip 2>/dev/null if [ "$?" -eq 0 ]; then echo "TESTING: gzip" @@ -33,7 +33,7 @@ else echo "TESTING SKIP: gzip not found" fi -which xzdec +which xzdec 2>/dev/null if [ "$?" -eq 0 ]; then echo "TESTING: xzdec" @@ -42,7 +42,7 @@ else echo "TESTING SKIP: xzdec not found" fi -which xz +which xz 2>/dev/null if [ "$?" -eq 0 ]; then echo "TESTING: xz" @@ -51,7 +51,7 @@ else echo "TESTING SKIP: xz not found" fi -which less +which less 2>/dev/null if [ "$?" -eq 0 ]; then echo "TESTING: less" @@ -60,7 +60,7 @@ else echo "TESTING SKIP: less not found" fi -which file +which file 2>/dev/null if [ "$?" -eq 0 ]; then echo "TESTING: file" @@ -69,7 +69,7 @@ else echo "TESTING SKIP: file not found" fi -which tar +which tar 2>/dev/null if [ "$?" -eq 0 ]; then echo "TESTING: tar" @@ -78,7 +78,7 @@ else echo "TESTING SKIP: tar not found" fi -which ping +which ping 2>/dev/null if [ "$?" -eq 0 ]; then echo "TESTING: ping" diff --git a/test/utils/utils.sh b/test/utils/utils.sh index 5438e11a8..d98e4c2e4 100755 --- a/test/utils/utils.sh +++ b/test/utils/utils.sh @@ -10,7 +10,7 @@ if [ -f /etc/debian_version ]; then libdir=$(dirname "$(dpkg -L firejail | grep faudit)") export PATH="$PATH:$libdir" fi -export PATH="$PATH:/usr/lib/firejail" +export PATH="$PATH:/usr/lib/firejail:/usr/lib64/firejail" echo "testing" > ~/firejail-test-file-7699 echo "testing" > /tmp/firejail-test-file-7699 @@ -39,7 +39,7 @@ echo "TESTING: version (test/utils/version.exp)" echo "TESTING: help (test/utils/help.exp)" ./help.exp -which man +which man 2>/dev/null if [ "$?" -eq 0 ]; then echo "TESTING: man (test/utils/man.exp)"