From b936e5ab77dfa0b54b2f6f6dd53762a8244e4230 Mon Sep 17 00:00:00 2001 From: Fred-Barclay Date: Sun, 19 Nov 2017 15:02:42 -0600 Subject: strip trailing whitespace --- src/fseccomp/seccomp.c | 2 +- src/fseccomp/seccomp_print.c | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src/fseccomp') diff --git a/src/fseccomp/seccomp.c b/src/fseccomp/seccomp.c index ef7dd5c54..028cd76a9 100644 --- a/src/fseccomp/seccomp.c +++ b/src/fseccomp/seccomp.c @@ -165,7 +165,7 @@ void seccomp_default_drop(const char *fname1, const char *fname2, char *list, in void seccomp_keep(const char *fname1, const char *fname2, char *list) { (void) fname2; - + // open file for pre-exec filter int fd = open(fname1, O_CREAT|O_WRONLY|O_TRUNC, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); if (fd < 0) { diff --git a/src/fseccomp/seccomp_print.c b/src/fseccomp/seccomp_print.c index e8df2bda5..ffc65e7c3 100644 --- a/src/fseccomp/seccomp_print.c +++ b/src/fseccomp/seccomp_print.c @@ -68,7 +68,7 @@ static int detect_filter_type(void) { assert(filter); printf("SECCOMP Filter\n"); - + // testing for main seccomp filter, protocol, mdwe - platform architecture const struct sock_filter start_main[] = { VALIDATE_ARCHITECTURE, @@ -79,7 +79,7 @@ static int detect_filter_type(void) { EXAMINE_SYSCALL #endif }; - + if (memcmp(&start_main[0], filter, sizeof(start_main)) == 0) { printf(" VALIDATE_ARCHITECTURE\n"); printf(" EXAMINE_SYSCALL\n"); @@ -88,26 +88,26 @@ static int detect_filter_type(void) { #endif return sizeof(start_main) / sizeof(struct sock_filter); } - - + + // testing for secondary 64 bit filter const struct sock_filter start_secondary_64[] = { VALIDATE_ARCHITECTURE_64, EXAMINE_SYSCALL, }; - + if (memcmp(&start_secondary_64[0], filter, sizeof(start_secondary_64)) == 0) { printf(" VALIDATE_ARCHITECTURE_64\n"); printf(" EXAMINE_SYSCALL\n"); return sizeof(start_secondary_64) / sizeof(struct sock_filter); } - + // testing for secondary 32 bit filter const struct sock_filter start_secondary_32[] = { VALIDATE_ARCHITECTURE_32, EXAMINE_SYSCALL, }; - + if (memcmp(&start_secondary_32[0], filter, sizeof(start_secondary_32)) == 0) { printf(" VALIDATE_ARCHITECTURE_32\n"); printf(" EXAMINE_SYSCALL\n"); @@ -132,7 +132,7 @@ static int detect_filter_type(void) { #endif return sizeof(start_secondary_block) / sizeof(struct sock_filter); } - + return 0; // filter unrecognized } @@ -146,7 +146,7 @@ void filter_print(const char *fname) { printf("Invalid seccomp filter %s\n", fname); return; } - + // loop trough the rest of commands while (i < filter_cnt) { // minimal parsing! -- cgit v1.2.3-54-g00ecf