aboutsummaryrefslogtreecommitdiffstats
path: root/src/faudit
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-07-27 08:05:51 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2016-07-27 08:05:51 -0400
commit9d5906c708bc5123377879bc0511ed5d7fe85852 (patch)
treeb03084c8e42e3e21c7071948494cd9252ee21979 /src/faudit
parentfixes (diff)
downloadfirejail-9d5906c708bc5123377879bc0511ed5d7fe85852.tar.gz
firejail-9d5906c708bc5123377879bc0511ed5d7fe85852.tar.zst
firejail-9d5906c708bc5123377879bc0511ed5d7fe85852.zip
fixed faudit compile problem for non-intel platforms
Diffstat (limited to 'src/faudit')
-rw-r--r--src/faudit/seccomp.c3
-rw-r--r--src/faudit/syscall.c4
2 files changed, 6 insertions, 1 deletions
diff --git a/src/faudit/seccomp.c b/src/faudit/seccomp.c
index 6f5d23c48..7b2999467 100644
--- a/src/faudit/seccomp.c
+++ b/src/faudit/seccomp.c
@@ -86,12 +86,13 @@ void seccomp_test(void) {
86 printf("pivot_root... "); fflush(0); 86 printf("pivot_root... "); fflush(0);
87 syscall_run("pivot_root"); 87 syscall_run("pivot_root");
88 88
89#if defined(__i386__) || defined(__x86_64__)
89 printf("iopl... "); fflush(0); 90 printf("iopl... "); fflush(0);
90 syscall_run("iopl"); 91 syscall_run("iopl");
91 92
92 printf("ioperm... "); fflush(0); 93 printf("ioperm... "); fflush(0);
93 syscall_run("ioperm"); 94 syscall_run("ioperm");
94 95#endif
95 printf("\n"); 96 printf("\n");
96 } 97 }
97 else 98 else
diff --git a/src/faudit/syscall.c b/src/faudit/syscall.c
index bc28936c9..9924be00f 100644
--- a/src/faudit/syscall.c
+++ b/src/faudit/syscall.c
@@ -20,7 +20,9 @@
20#include "faudit.h" 20#include "faudit.h"
21#include <sys/ptrace.h> 21#include <sys/ptrace.h>
22#include <sys/swap.h> 22#include <sys/swap.h>
23#if defined(__i386__) || defined(__x86_64__)
23#include <sys/io.h> 24#include <sys/io.h>
25#endif
24#include <sys/wait.h> 26#include <sys/wait.h>
25extern int init_module(void *module_image, unsigned long len, 27extern int init_module(void *module_image, unsigned long len,
26 const char *param_values); 28 const char *param_values);
@@ -69,6 +71,7 @@ void syscall_helper(int argc, char **argv) {
69 pivot_root(NULL, NULL); 71 pivot_root(NULL, NULL);
70 printf("\nUGLY: pivot_root syscall permitted.\n"); 72 printf("\nUGLY: pivot_root syscall permitted.\n");
71 } 73 }
74#if defined(__i386__) || defined(__x86_64__)
72 else if (strcmp(argv[2], "iopl") == 0) { 75 else if (strcmp(argv[2], "iopl") == 0) {
73 iopl(0L); 76 iopl(0L);
74 printf("\nUGLY: iopl syscall permitted.\n"); 77 printf("\nUGLY: iopl syscall permitted.\n");
@@ -77,6 +80,7 @@ void syscall_helper(int argc, char **argv) {
77 ioperm(0, 0, 0); 80 ioperm(0, 0, 0);
78 printf("\nUGLY: ioperm syscall permitted.\n"); 81 printf("\nUGLY: ioperm syscall permitted.\n");
79 } 82 }
83#endif
80 exit(0); 84 exit(0);
81} 85}
82 86