compile cleanup

This commit is contained in:
netblue30 2020-04-05 09:57:34 -04:00
parent 2a41b9d2ef
commit 0dc883bfcb
4 changed files with 35 additions and 6 deletions

View file

@ -966,8 +966,15 @@ static void run_builder(int argc, char **argv) {
exit(1);
}
void filter_add_errno(int fd, int syscall, int arg, void *ptrarg, bool native) {}
void filter_add_errno(int fd, int syscall, int arg, void *ptrarg, bool native) {
(void) fd;
(void) syscall;
(void) arg;
(void) ptrarg;
(void) native;
}
#ifdef HAVE_SECCOMP
static int check_postexec(const char *list) {
char *prelist, *postlist;
@ -978,6 +985,7 @@ static int check_postexec(const char *list) {
}
return 0;
}
#endif
//*******************************************
// Main program

View file

@ -324,14 +324,12 @@ int seccomp_filter_keep(bool native) {
if (arg_debug)
printf("Build keep seccomp filter\n");
const char *command, *filter, *postexec_filter, *list;
const char *filter, *postexec_filter, *list;
if (native) {
command = "keep";
filter = RUN_SECCOMP_CFG;
postexec_filter = RUN_SECCOMP_POSTEXEC;
list = cfg.seccomp_list_keep;
} else {
command = "keep32";
filter = RUN_SECCOMP_32;
postexec_filter = RUN_SECCOMP_POSTEXEC_32;
list = cfg.seccomp_list_keep32;

View file

@ -25,7 +25,13 @@ static void usage(void) {
}
int arg_quiet = 0;
void filter_add_errno(int fd, int syscall, int arg, void *ptrarg, bool native) {}
void filter_add_errno(int fd, int syscall, int arg, void *ptrarg, bool native) {
(void) fd;
(void) syscall;
(void) arg;
(void) ptrarg;
(void) native;
}
int main(int argc, char **argv) {
#if 0

View file

@ -10,7 +10,7 @@ arr[4]="TEST 4: compile firetunnel disabled"
arr[5]="TEST 5: compile user namespace disabled"
arr[6]="TEST 6: compile network disabled"
arr[7]="TEST 7: compile X11 disabled"
arr[8]="deprecated: TEST 8: compile network restricted"
arr[8]="TEST 8: compile selinux"
arr[9]="TEST 9: compile file transfer disabled"
arr[10]="TEST 10: compile disable whitelist"
arr[11]="TEST 11: compile disable global config"
@ -183,6 +183,23 @@ cp output-configure oc7
cp output-make om7
rm output-configure output-make
#*****************************************************************
# TEST 8
#*****************************************************************
# - enable selinux
#*****************************************************************
print_title "${arr[8]}"
# seccomp
cd firejail
make distclean
./configure --prefix=/usr --enable-selinux --enable-fatal-warnings 2>&1 | tee ../output-configure
make -j4 2>&1 | tee ../output-make
cd ..
grep Warning output-configure output-make > ./report-test8
grep Error output-configure output-make >> ./report-test8
cp output-configure oc8
cp output-make om8
rm output-configure output-make
#*****************************************************************
# TEST 9