diff options
author | netblue30 <netblue30@yahoo.com> | 2017-05-10 07:21:29 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2017-05-10 07:21:29 -0400 |
commit | 030bd37378097b45346eb3d6dfc6fba18718fb29 (patch) | |
tree | 3b751dc10d202ec48a8b1bb157db0cc97e6d4ffd /src | |
parent | adding gimp-2.8.profile (diff) | |
download | firejail-030bd37378097b45346eb3d6dfc6fba18718fb29.tar.gz firejail-030bd37378097b45346eb3d6dfc6fba18718fb29.tar.zst firejail-030bd37378097b45346eb3d6dfc6fba18718fb29.zip |
32bit plaform fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/sandbox.c | 2 | ||||
-rw-r--r-- | src/include/common.h | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/firejail/sandbox.c b/src/firejail/sandbox.c index 9ecb1c8cc..ecc365895 100644 --- a/src/firejail/sandbox.c +++ b/src/firejail/sandbox.c | |||
@@ -907,12 +907,14 @@ int sandbox(void* sandbox_arg) { | |||
907 | // set seccomp //todo: push it down after drop_privs and/or configuring noroot | 907 | // set seccomp //todo: push it down after drop_privs and/or configuring noroot |
908 | #ifdef HAVE_SECCOMP | 908 | #ifdef HAVE_SECCOMP |
909 | // install protocol filter | 909 | // install protocol filter |
910 | #ifdef SYS_SOCKET | ||
910 | if (cfg.protocol) { | 911 | if (cfg.protocol) { |
911 | if (arg_debug) | 912 | if (arg_debug) |
912 | printf("Install protocol filter: %s\n", cfg.protocol); | 913 | printf("Install protocol filter: %s\n", cfg.protocol); |
913 | seccomp_load(RUN_SECCOMP_PROTOCOL); // install filter | 914 | seccomp_load(RUN_SECCOMP_PROTOCOL); // install filter |
914 | protocol_filter_save(); // save filter in RUN_PROTOCOL_CFG | 915 | protocol_filter_save(); // save filter in RUN_PROTOCOL_CFG |
915 | } | 916 | } |
917 | #endif | ||
916 | 918 | ||
917 | // if a keep list is available, disregard the drop list | 919 | // if a keep list is available, disregard the drop list |
918 | if (arg_seccomp == 1) { | 920 | if (arg_seccomp == 1) { |
diff --git a/src/include/common.h b/src/include/common.h index 59b7f6213..7067ae68c 100644 --- a/src/include/common.h +++ b/src/include/common.h | |||
@@ -115,6 +115,10 @@ static inline unsigned long long getticks(void) { | |||
115 | unsigned a, d; | 115 | unsigned a, d; |
116 | asm volatile("rdtsc" : "=a" (a), "=d" (d)); | 116 | asm volatile("rdtsc" : "=a" (a), "=d" (d)); |
117 | return ((unsigned long long)a) | (((unsigned long long)d) << 32); | 117 | return ((unsigned long long)a) | (((unsigned long long)d) << 32); |
118 | #elif defined(__i386__) | ||
119 | unsigned long long ret; | ||
120 | __asm__ __volatile__("rdtsc" : "=A" (ret)); | ||
121 | return ret; | ||
118 | #else | 122 | #else |
119 | return 0; // not implemented | 123 | return 0; // not implemented |
120 | #endif | 124 | #endif |