diff options
author | 2019-05-17 09:37:43 -0500 | |
---|---|---|
committer | 2019-05-17 09:37:43 -0500 | |
commit | e115ad3cd7d5443840f536369b59ed33917c6951 (patch) | |
tree | c4b3030b9920b0386903fe31d56b992d1e5fd364 /src | |
parent | Cosmetic changes for pidgin.profile (#2705) (diff) | |
parent | glibc missing O_PATH definition on CentOS 6 - #2696 (diff) | |
download | firejail-e115ad3cd7d5443840f536369b59ed33917c6951.tar.gz firejail-e115ad3cd7d5443840f536369b59ed33917c6951.tar.zst firejail-e115ad3cd7d5443840f536369b59ed33917c6951.zip |
Merge pull request #2701 from smitsohu/opath
glibc missing O_PATH definition on CentOS 6
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/fs.c | 4 | ||||
-rw-r--r-- | src/firejail/fs_home.c | 6 | ||||
-rw-r--r-- | src/firejail/fs_whitelist.c | 6 | ||||
-rw-r--r-- | src/firejail/mountinfo.c | 4 | ||||
-rw-r--r-- | src/firejail/pulseaudio.c | 4 | ||||
-rw-r--r-- | src/firejail/util.c | 4 | ||||
-rw-r--r-- | src/firejail/x11.c | 4 |
7 files changed, 30 insertions, 2 deletions
diff --git a/src/firejail/fs.c b/src/firejail/fs.c index f9d968427..bf7c0a4b2 100644 --- a/src/firejail/fs.c +++ b/src/firejail/fs.c | |||
@@ -27,7 +27,11 @@ | |||
27 | #include <glob.h> | 27 | #include <glob.h> |
28 | #include <dirent.h> | 28 | #include <dirent.h> |
29 | #include <errno.h> | 29 | #include <errno.h> |
30 | |||
30 | #include <fcntl.h> | 31 | #include <fcntl.h> |
32 | #ifndef O_PATH | ||
33 | # define O_PATH 010000000 | ||
34 | #endif | ||
31 | 35 | ||
32 | #define MAX_BUF 4096 | 36 | #define MAX_BUF 4096 |
33 | #define EMPTY_STRING ("") | 37 | #define EMPTY_STRING ("") |
diff --git a/src/firejail/fs_home.c b/src/firejail/fs_home.c index e35bf073d..b44d09acc 100644 --- a/src/firejail/fs_home.c +++ b/src/firejail/fs_home.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/limits.h> | 22 | #include <linux/limits.h> |
23 | #include <glob.h> | 23 | #include <glob.h> |
24 | #include <dirent.h> | 24 | #include <dirent.h> |
25 | #include <fcntl.h> | ||
26 | #include <errno.h> | 25 | #include <errno.h> |
27 | #include <sys/stat.h> | 26 | #include <sys/stat.h> |
28 | #include <sys/types.h> | 27 | #include <sys/types.h> |
@@ -31,6 +30,11 @@ | |||
31 | #include <grp.h> | 30 | #include <grp.h> |
32 | //#include <ftw.h> | 31 | //#include <ftw.h> |
33 | 32 | ||
33 | #include <fcntl.h> | ||
34 | #ifndef O_PATH | ||
35 | # define O_PATH 010000000 | ||
36 | #endif | ||
37 | |||
34 | static void skel(const char *homedir, uid_t u, gid_t g) { | 38 | static void skel(const char *homedir, uid_t u, gid_t g) { |
35 | char *fname; | 39 | char *fname; |
36 | 40 | ||
diff --git a/src/firejail/fs_whitelist.c b/src/firejail/fs_whitelist.c index d128065d3..bce44b9e5 100644 --- a/src/firejail/fs_whitelist.c +++ b/src/firejail/fs_whitelist.c | |||
@@ -24,9 +24,13 @@ | |||
24 | #include <fnmatch.h> | 24 | #include <fnmatch.h> |
25 | #include <glob.h> | 25 | #include <glob.h> |
26 | #include <dirent.h> | 26 | #include <dirent.h> |
27 | #include <fcntl.h> | ||
28 | #include <errno.h> | 27 | #include <errno.h> |
29 | 28 | ||
29 | #include <fcntl.h> | ||
30 | #ifndef O_PATH | ||
31 | # define O_PATH 010000000 | ||
32 | #endif | ||
33 | |||
30 | // mountinfo functionality test; | 34 | // mountinfo functionality test; |
31 | // 1. enable TEST_MOUNTINFO definition | 35 | // 1. enable TEST_MOUNTINFO definition |
32 | // 2. run firejail --whitelist=/any/directory | 36 | // 2. run firejail --whitelist=/any/directory |
diff --git a/src/firejail/mountinfo.c b/src/firejail/mountinfo.c index 0717b2044..7369ad247 100644 --- a/src/firejail/mountinfo.c +++ b/src/firejail/mountinfo.c | |||
@@ -19,7 +19,11 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include "firejail.h" | 21 | #include "firejail.h" |
22 | |||
22 | #include <fcntl.h> | 23 | #include <fcntl.h> |
24 | #ifndef O_PATH | ||
25 | # define O_PATH 010000000 | ||
26 | #endif | ||
23 | 27 | ||
24 | #define MAX_BUF 4096 | 28 | #define MAX_BUF 4096 |
25 | 29 | ||
diff --git a/src/firejail/pulseaudio.c b/src/firejail/pulseaudio.c index 26beaf35a..e3f237b8e 100644 --- a/src/firejail/pulseaudio.c +++ b/src/firejail/pulseaudio.c | |||
@@ -24,7 +24,11 @@ | |||
24 | #include <sys/mount.h> | 24 | #include <sys/mount.h> |
25 | #include <dirent.h> | 25 | #include <dirent.h> |
26 | #include <sys/wait.h> | 26 | #include <sys/wait.h> |
27 | |||
27 | #include <fcntl.h> | 28 | #include <fcntl.h> |
29 | #ifndef O_PATH | ||
30 | # define O_PATH 010000000 | ||
31 | #endif | ||
28 | 32 | ||
29 | // disable pulseaudio socket | 33 | // disable pulseaudio socket |
30 | void pulseaudio_disable(void) { | 34 | void pulseaudio_disable(void) { |
diff --git a/src/firejail/util.c b/src/firejail/util.c index 3e2cd13d5..fff0bbf2f 100644 --- a/src/firejail/util.c +++ b/src/firejail/util.c | |||
@@ -29,7 +29,11 @@ | |||
29 | #include <sys/ioctl.h> | 29 | #include <sys/ioctl.h> |
30 | #include <termios.h> | 30 | #include <termios.h> |
31 | #include <sys/wait.h> | 31 | #include <sys/wait.h> |
32 | |||
32 | #include <fcntl.h> | 33 | #include <fcntl.h> |
34 | #ifndef O_PATH | ||
35 | # define O_PATH 010000000 | ||
36 | #endif | ||
33 | 37 | ||
34 | #define MAX_GROUPS 1024 | 38 | #define MAX_GROUPS 1024 |
35 | #define MAXBUF 4098 | 39 | #define MAXBUF 4098 |
diff --git a/src/firejail/x11.c b/src/firejail/x11.c index b0ed10b30..9d821d980 100644 --- a/src/firejail/x11.c +++ b/src/firejail/x11.c | |||
@@ -31,7 +31,11 @@ | |||
31 | #include <sys/wait.h> | 31 | #include <sys/wait.h> |
32 | #include <errno.h> | 32 | #include <errno.h> |
33 | #include <limits.h> | 33 | #include <limits.h> |
34 | |||
34 | #include <fcntl.h> | 35 | #include <fcntl.h> |
36 | #ifndef O_PATH | ||
37 | # define O_PATH 010000000 | ||
38 | #endif | ||
35 | 39 | ||
36 | 40 | ||
37 | // Parse the DISPLAY environment variable and return a display number. | 41 | // Parse the DISPLAY environment variable and return a display number. |