diff options
author | 2018-06-09 10:14:05 -0400 | |
---|---|---|
committer | 2018-06-09 10:14:05 -0400 | |
commit | decbe96a48fc21c11349867ff2c1ada7c88a0113 (patch) | |
tree | 211806f8951a01ec34387d5315eb81e54d2c843e /src | |
parent | support wireless interfaces for --net (diff) | |
download | firejail-decbe96a48fc21c11349867ff2c1ada7c88a0113.tar.gz firejail-decbe96a48fc21c11349867ff2c1ada7c88a0113.tar.zst firejail-decbe96a48fc21c11349867ff2c1ada7c88a0113.zip |
glibc missing O_PATH definition on Debian 7
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/fs.c | 7 | ||||
-rw-r--r-- | src/firejail/util.c | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/firejail/fs.c b/src/firejail/fs.c index 8db45f967..4e411c5ee 100644 --- a/src/firejail/fs.c +++ b/src/firejail/fs.c | |||
@@ -26,9 +26,14 @@ | |||
26 | #include <fnmatch.h> | 26 | #include <fnmatch.h> |
27 | #include <glob.h> | 27 | #include <glob.h> |
28 | #include <dirent.h> | 28 | #include <dirent.h> |
29 | #include <fcntl.h> | ||
30 | #include <errno.h> | 29 | #include <errno.h> |
31 | 30 | ||
31 | // on Debian 7 we are missing O_PATH definition | ||
32 | #include <fcntl.h> | ||
33 | #ifndef O_PATH | ||
34 | #define O_PATH 010000000 | ||
35 | #endif | ||
36 | |||
32 | // check noblacklist statements not matched by a proper blacklist in disable-*.inc files | 37 | // check noblacklist statements not matched by a proper blacklist in disable-*.inc files |
33 | //#define TEST_NO_BLACKLIST_MATCHING | 38 | //#define TEST_NO_BLACKLIST_MATCHING |
34 | 39 | ||
diff --git a/src/firejail/util.c b/src/firejail/util.c index f5a252514..f6233359a 100644 --- a/src/firejail/util.c +++ b/src/firejail/util.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <ftw.h> | 22 | #include <ftw.h> |
23 | #include <sys/stat.h> | 23 | #include <sys/stat.h> |
24 | #include <sys/mount.h> | 24 | #include <sys/mount.h> |
25 | #include <fcntl.h> | ||
26 | #include <syslog.h> | 25 | #include <syslog.h> |
27 | #include <errno.h> | 26 | #include <errno.h> |
28 | #include <dirent.h> | 27 | #include <dirent.h> |
@@ -31,6 +30,12 @@ | |||
31 | #include <termios.h> | 30 | #include <termios.h> |
32 | #include <sys/wait.h> | 31 | #include <sys/wait.h> |
33 | 32 | ||
33 | // on Debian 7 we are missing O_PATH definition | ||
34 | #include <fcntl.h> | ||
35 | #ifndef O_PATH | ||
36 | #define O_PATH 010000000 | ||
37 | #endif | ||
38 | |||
34 | #define MAX_GROUPS 1024 | 39 | #define MAX_GROUPS 1024 |
35 | 40 | ||
36 | // send the error to /var/log/auth.log and exit after a small delay | 41 | // send the error to /var/log/auth.log and exit after a small delay |