aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-09-08 09:35:41 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2016-09-08 09:35:41 -0400
commita72ecf8ce0efd38d9cd6df218d352817c4734426 (patch)
tree071f64590968dd0207da2dc66ea5832a6b106112 /src
parent0.9.42 testing (diff)
downloadfirejail-a72ecf8ce0efd38d9cd6df218d352817c4734426.tar.gz
firejail-a72ecf8ce0efd38d9cd6df218d352817c4734426.tar.zst
firejail-a72ecf8ce0efd38d9cd6df218d352817c4734426.zip
0.9.42 testing - CentOS 60.9.42
Diffstat (limited to 'src')
-rw-r--r--src/firejail/appimage.c11
-rw-r--r--src/firejail/checkcfg.c12
2 files changed, 21 insertions, 2 deletions
diff --git a/src/firejail/appimage.c b/src/firejail/appimage.c
index eb90a39dd..05bd8a1d8 100644
--- a/src/firejail/appimage.c
+++ b/src/firejail/appimage.c
@@ -40,6 +40,7 @@ void appimage_set(const char *appimage_path) {
40 assert(devloop == NULL); // don't call this twice! 40 assert(devloop == NULL); // don't call this twice!
41 EUID_ASSERT(); 41 EUID_ASSERT();
42 42
43#ifdef LOOP_CTL_GET_FREE // test for older kernels; this definition is found in /usr/include/linux/loop.h
43 // check appimage_path 44 // check appimage_path
44 if (access(appimage_path, R_OK) == -1) { 45 if (access(appimage_path, R_OK) == -1) {
45 fprintf(stderr, "Error: cannot access AppImage file\n"); 46 fprintf(stderr, "Error: cannot access AppImage file\n");
@@ -48,8 +49,10 @@ void appimage_set(const char *appimage_path) {
48 49
49 // open as user to prevent race condition 50 // open as user to prevent race condition
50 int ffd = open(appimage_path, O_RDONLY|O_CLOEXEC); 51 int ffd = open(appimage_path, O_RDONLY|O_CLOEXEC);
51 if (ffd == -1) 52 if (ffd == -1) {
52 errExit("open"); 53 fprintf(stderr, "Error: /dev/loop-control interface is not supported by your kernel\n");
54 exit(1);
55 }
53 56
54 EUID_ROOT(); 57 EUID_ROOT();
55 58
@@ -109,6 +112,10 @@ void appimage_set(const char *appimage_path) {
109 errExit("asprintf"); 112 errExit("asprintf");
110 113
111 free(mode); 114 free(mode);
115#else
116 fprintf(stderr, "Error: /dev/loop-control interface is not supported by your kernel\n");
117 exit(1);
118#endif
112} 119}
113 120
114void appimage_clear(void) { 121void appimage_clear(void) {
diff --git a/src/firejail/checkcfg.c b/src/firejail/checkcfg.c
index 99266c575..34078492e 100644
--- a/src/firejail/checkcfg.c
+++ b/src/firejail/checkcfg.c
@@ -19,6 +19,7 @@
19*/ 19*/
20#include "firejail.h" 20#include "firejail.h"
21#include <sys/stat.h> 21#include <sys/stat.h>
22#include <linux/loop.h>
22 23
23#define MAX_READ 8192 // line buffer for profile files 24#define MAX_READ 8192 // line buffer for profile files
24 25
@@ -286,6 +287,17 @@ void print_compiletime_support(void) {
286#endif 287#endif
287 ); 288 );
288 289
290 printf("\t- AppImage support is %s\n",
291#ifdef LOOP_CTL_GET_FREE // test for older kernels; this definition is found in /usr/include/linux/loop.h
292 "enabled"
293#else
294 "disabled"
295#endif
296 );
297
298
299
300
289 301
290 printf("\t- bind support is %s\n", 302 printf("\t- bind support is %s\n",
291#ifdef HAVE_BIND 303#ifdef HAVE_BIND