diff options
-rw-r--r-- | src/firejail/fs_bin.c | 4 | ||||
-rw-r--r-- | src/firejail/join.c | 2 | ||||
-rw-r--r-- | src/fldd/main.c | 2 | ||||
-rw-r--r-- | src/fseccomp/syscall.c | 3 |
4 files changed, 8 insertions, 3 deletions
diff --git a/src/firejail/fs_bin.c b/src/firejail/fs_bin.c index 7b259bf03..f70bd095b 100644 --- a/src/firejail/fs_bin.c +++ b/src/firejail/fs_bin.c | |||
@@ -152,8 +152,8 @@ void fs_private_bin_list(void) { | |||
152 | duplicate(ptr, fplist); | 152 | duplicate(ptr, fplist); |
153 | free(dlist); | 153 | free(dlist); |
154 | fs_logger_print(); | 154 | fs_logger_print(); |
155 | if (fplist) | 155 | if (fplist) |
156 | fclose(fplist); | 156 | fclose(fplist); |
157 | 157 | ||
158 | // mount-bind | 158 | // mount-bind |
159 | int i = 0; | 159 | int i = 0; |
diff --git a/src/firejail/join.c b/src/firejail/join.c index 84bd80364..dd7b2e9bb 100644 --- a/src/firejail/join.c +++ b/src/firejail/join.c | |||
@@ -51,8 +51,10 @@ static void extract_x11_display(pid_t pid) { | |||
51 | 51 | ||
52 | if (1 != fscanf(fp, "%d", &display)) { | 52 | if (1 != fscanf(fp, "%d", &display)) { |
53 | fprintf(stderr, "Error: cannot read X11 display file\n"); | 53 | fprintf(stderr, "Error: cannot read X11 display file\n"); |
54 | fclose(fp); | ||
54 | return; | 55 | return; |
55 | } | 56 | } |
57 | fclose(fp); | ||
56 | 58 | ||
57 | // check display range | 59 | // check display range |
58 | if (display < X11_DISPLAY_START || display > X11_DISPLAY_END) { | 60 | if (display < X11_DISPLAY_START || display > X11_DISPLAY_END) { |
diff --git a/src/fldd/main.c b/src/fldd/main.c index d9045c425..947c6b4ae 100644 --- a/src/fldd/main.c +++ b/src/fldd/main.c | |||
@@ -176,7 +176,7 @@ static void copy_libs_for_exe(const char *exe) { | |||
176 | if (!ptr_ok(dbuf, base, end, "dbuf")) | 176 | if (!ptr_ok(dbuf, base, end, "dbuf")) |
177 | goto close; | 177 | goto close; |
178 | // Find DT_RPATH/DT_RUNPATH tags first | 178 | // Find DT_RPATH/DT_RUNPATH tags first |
179 | long size = sbuf->sh_size; | 179 | unsigned long size = sbuf->sh_size; |
180 | while (size >= sizeof(*dbuf) && ptr_ok(dbuf, base, end, "dbuf")) { | 180 | while (size >= sizeof(*dbuf) && ptr_ok(dbuf, base, end, "dbuf")) { |
181 | if (dbuf->d_tag == DT_RPATH || dbuf->d_tag == DT_RUNPATH) { | 181 | if (dbuf->d_tag == DT_RPATH || dbuf->d_tag == DT_RUNPATH) { |
182 | const char *searchpath = strbase + dbuf->d_un.d_ptr; | 182 | const char *searchpath = strbase + dbuf->d_un.d_ptr; |
diff --git a/src/fseccomp/syscall.c b/src/fseccomp/syscall.c index b9e6d995b..3a9be51a7 100644 --- a/src/fseccomp/syscall.c +++ b/src/fseccomp/syscall.c | |||
@@ -511,6 +511,7 @@ int syscall_check_list(const char *slist, void (*callback)(int fd, int syscall, | |||
511 | 511 | ||
512 | static void find_syscall(int fd, int syscall, int arg, void *ptrarg) { | 512 | static void find_syscall(int fd, int syscall, int arg, void *ptrarg) { |
513 | (void)fd; | 513 | (void)fd; |
514 | (void) arg; | ||
514 | SyscallCheckList *ptr = ptrarg; | 515 | SyscallCheckList *ptr = ptrarg; |
515 | if (syscall == ptr->syscall) | 516 | if (syscall == ptr->syscall) |
516 | ptr->found = true; | 517 | ptr->found = true; |
@@ -518,6 +519,7 @@ static void find_syscall(int fd, int syscall, int arg, void *ptrarg) { | |||
518 | 519 | ||
519 | // go through list2 and find matches for problem syscall | 520 | // go through list2 and find matches for problem syscall |
520 | static void syscall_in_list(int fd, int syscall, int arg, void *ptrarg) { | 521 | static void syscall_in_list(int fd, int syscall, int arg, void *ptrarg) { |
522 | (void) fd; | ||
521 | (void)arg; | 523 | (void)arg; |
522 | SyscallCheckList *ptr = ptrarg; | 524 | SyscallCheckList *ptr = ptrarg; |
523 | SyscallCheckList sl; | 525 | SyscallCheckList sl; |
@@ -543,6 +545,7 @@ static void syscall_in_list(int fd, int syscall, int arg, void *ptrarg) { | |||
543 | 545 | ||
544 | // go through list and find matches for syscalls in list @default-keep | 546 | // go through list and find matches for syscalls in list @default-keep |
545 | void syscalls_in_list(const char *list, const char *slist, int fd, char **prelist, char **postlist) { | 547 | void syscalls_in_list(const char *list, const char *slist, int fd, char **prelist, char **postlist) { |
548 | (void) fd; | ||
546 | SyscallCheckList sl; | 549 | SyscallCheckList sl; |
547 | // these syscalls are used by firejail after the seccomp filter is initialized | 550 | // these syscalls are used by firejail after the seccomp filter is initialized |
548 | sl.slist = slist; | 551 | sl.slist = slist; |