aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2020-08-14 06:42:22 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2020-08-14 06:42:22 -0400
commit8263c47038b498fb3d3fdf80e1da186637c6b8ad (patch)
treecb65ed4c2917fcde26bb77cc903330992d755244
parentAppArmor fix (diff)
parenttests: fix check for modules directory (diff)
downloadfirejail-8263c47038b498fb3d3fdf80e1da186637c6b8ad.tar.gz
firejail-8263c47038b498fb3d3fdf80e1da186637c6b8ad.tar.zst
firejail-8263c47038b498fb3d3fdf80e1da186637c6b8ad.zip
Merge branch 'release-0.9.62' of https://github.com/netblue30/firejail into release-0.9.62
-rw-r--r--src/firejail/fs_dev.c3
-rwxr-xr-xtest/environment/rlimit-profile.exp2
-rwxr-xr-xtest/environment/rlimit.exp4
-rw-r--r--test/environment/rlimit.profile2
-rwxr-xr-xtest/fs/private-lib.exp4
5 files changed, 8 insertions, 7 deletions
diff --git a/src/firejail/fs_dev.c b/src/firejail/fs_dev.c
index d807f527d..ce5d1bc96 100644
--- a/src/firejail/fs_dev.c
+++ b/src/firejail/fs_dev.c
@@ -25,6 +25,7 @@
25#include <dirent.h> 25#include <dirent.h>
26#include <fcntl.h> 26#include <fcntl.h>
27#include <pwd.h> 27#include <pwd.h>
28#include <errno.h>
28#ifndef _BSD_SOURCE 29#ifndef _BSD_SOURCE
29#define _BSD_SOURCE 30#define _BSD_SOURCE
30#endif 31#endif
@@ -148,7 +149,7 @@ static void create_char_dev(const char *path, mode_t mode, int major, int minor)
148 return; 149 return;
149 150
150errexit: 151errexit:
151 fprintf(stderr, "Error: cannot create %s device\n", path); 152 fprintf(stderr, "Error: cannot create %s device: %s\n", path, strerror(errno));
152 exit(1); 153 exit(1);
153} 154}
154 155
diff --git a/test/environment/rlimit-profile.exp b/test/environment/rlimit-profile.exp
index 43d6a3ee0..33eb0b3fd 100755
--- a/test/environment/rlimit-profile.exp
+++ b/test/environment/rlimit-profile.exp
@@ -27,7 +27,7 @@ expect {
27} 27}
28expect { 28expect {
29 timeout {puts "TESTING ERROR 1.4\n";exit} 29 timeout {puts "TESTING ERROR 1.4\n";exit}
30 "Max address space 123456789012 123456789012" 30 "Max address space 1234567890 1234567890"
31} 31}
32expect { 32expect {
33 timeout {puts "TESTING ERROR 1.5\n";exit} 33 timeout {puts "TESTING ERROR 1.5\n";exit}
diff --git a/test/environment/rlimit.exp b/test/environment/rlimit.exp
index 38cdc3eea..c0ba895fe 100755
--- a/test/environment/rlimit.exp
+++ b/test/environment/rlimit.exp
@@ -5,7 +5,7 @@ cd /home
5spawn $env(SHELL) 5spawn $env(SHELL)
6match_max 100000 6match_max 100000
7 7
8send -- "firejail --rlimit-fsize=1024 --rlimit-nproc=1000 --rlimit-nofile=500 --rlimit-sigpending=200 --rlimit-as=123456789012\r" 8send -- "firejail --rlimit-fsize=1024 --rlimit-nproc=1000 --rlimit-nofile=500 --rlimit-sigpending=200 --rlimit-as=1234567890\r"
9expect { 9expect {
10 timeout {puts "TESTING ERROR 0\n";exit} 10 timeout {puts "TESTING ERROR 0\n";exit}
11 "Child process initialized" 11 "Child process initialized"
@@ -27,7 +27,7 @@ expect {
27} 27}
28expect { 28expect {
29 timeout {puts "TESTING ERROR 1.4\n";exit} 29 timeout {puts "TESTING ERROR 1.4\n";exit}
30 "Max address space 123456789012 123456789012" 30 "Max address space 1234567890 1234567890"
31} 31}
32expect { 32expect {
33 timeout {puts "TESTING ERROR 1.5\n";exit} 33 timeout {puts "TESTING ERROR 1.5\n";exit}
diff --git a/test/environment/rlimit.profile b/test/environment/rlimit.profile
index a569edc6d..2f1134e6c 100644
--- a/test/environment/rlimit.profile
+++ b/test/environment/rlimit.profile
@@ -2,4 +2,4 @@ rlimit-fsize 1024
2rlimit-nproc 1000 2rlimit-nproc 1000
3rlimit-nofile 500 3rlimit-nofile 500
4rlimit-sigpending 200 4rlimit-sigpending 200
5rlimit-as 123456789012 5rlimit-as 1234567890
diff --git a/test/fs/private-lib.exp b/test/fs/private-lib.exp
index 777424ebe..21093e119 100755
--- a/test/fs/private-lib.exp
+++ b/test/fs/private-lib.exp
@@ -30,8 +30,8 @@ after 100
30send -- "cd /lib; find .\r" 30send -- "cd /lib; find .\r"
31expect { 31expect {
32 timeout {puts "TESTING ERROR 5\n";exit} 32 timeout {puts "TESTING ERROR 5\n";exit}
33 "modules" {puts "TESTING ERROR 6\n";exit} 33 "./modules" {puts "TESTING ERROR 6\n";exit}
34 "firmware" {puts "TESTING ERROR 7\n";exit} 34 "./firmware" {puts "TESTING ERROR 7\n";exit}
35 "libc.so" 35 "libc.so"
36} 36}
37after 100 37after 100