Skip to content

Commit

Permalink
private-etc: kdiff3, gzip, gunzip, tar etc
Browse files Browse the repository at this point in the history
  • Loading branch information
netblue30 committed Feb 10, 2023
1 parent 8983cff commit 29da82d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
1 change: 1 addition & 0 deletions etc/profile-a-l/archiver-common.profile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ x11 none

private-cache
private-dev
private-etc

This comment has been minimized.

Copy link
@glitsj16

glitsj16 Feb 11, 2023

Collaborator

This is already in some of our archiver profiles:

  • atool.profile
  • bsdtar.profile
  • tar.profile
  • unrar.profile
  • unzip.profile

Here's a PR to drop private-etc from those.


dbus-user none
dbus-system none
Expand Down
1 change: 1 addition & 0 deletions etc/profile-a-l/kdiff3.profile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ disable-mnt
private-bin kdiff3
private-cache
private-dev
private-etc @x11

dbus-user none
dbus-system none
Expand Down
16 changes: 5 additions & 11 deletions test/sysutils/gzip.exp
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,14 @@ set timeout 10
spawn $env(SHELL)
match_max 100000

send -- "/bin/gzip -c /usr/bin/firejail > firejail_t1\r"
sleep 1
send -- "rm index.html*\r"
after 500

send -- "firejail /bin/gzip -c /usr/bin/firejail > firejail_t2\r"
sleep 1

send -- "diff -s firejail_t1 firejail_t2\r"
send -- "firejail gzip -c ../../mkdeb.sh | firejail gunzip -c\r"
expect {
timeout {puts "TESTING ERROR 1\n";exit}
"firejail_t1 and firejail_t2 are identical"
"This file is part of Firejail project"
}

send -- "rm firejail_t*\r"
sleep 1

after 500

puts "\nall done\n"
8 changes: 8 additions & 0 deletions test/sysutils/sysutils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ export MALLOC_CHECK_=3
export MALLOC_PERTURB_=$(($RANDOM % 255 + 1))
export LC_ALL=C

if command -v gzip
then
echo "TESTING: gzip"
./gzip.exp
else
echo "TESTING SKIP: md5sum not found"
fi

if command -v md5sum
then
echo "TESTING: md5sum"
Expand Down

0 comments on commit 29da82d

Please sign in to comment.