aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-11-13 20:35:12 -0500
committerLibravatar netblue30 <netblue30@yahoo.com>2016-11-13 20:35:12 -0500
commit2f8688a17eb9f20d15b1ac53cb58c2759987ed71 (patch)
treefee7cf10a8f7c45f0d34ce3535801b2ee256dee8 /src
parentmajor cleanup and testing (diff)
downloadfirejail-2f8688a17eb9f20d15b1ac53cb58c2759987ed71.tar.gz
firejail-2f8688a17eb9f20d15b1ac53cb58c2759987ed71.tar.zst
firejail-2f8688a17eb9f20d15b1ac53cb58c2759987ed71.zip
testing
Diffstat (limited to 'src')
-rw-r--r--src/firejail/fs_home.c3
-rw-r--r--src/firejail/preproc.c12
-rw-r--r--src/firejail/pulseaudio.c4
3 files changed, 7 insertions, 12 deletions
diff --git a/src/firejail/fs_home.c b/src/firejail/fs_home.c
index 91fbe592a..242482d26 100644
--- a/src/firejail/fs_home.c
+++ b/src/firejail/fs_home.c
@@ -626,6 +626,9 @@ void fs_private_home_list(void) {
626 626
627 fs_logger_print(); // save the current log 627 fs_logger_print(); // save the current log
628 free(dlist); 628 free(dlist);
629#ifdef HAVE_GCOV
630 __gcov_flush();
631#endif
629 _exit(0); 632 _exit(0);
630 } 633 }
631 // wait for the child to finish 634 // wait for the child to finish
diff --git a/src/firejail/preproc.c b/src/firejail/preproc.c
index fe5f2eb44..ea4e6743f 100644
--- a/src/firejail/preproc.c
+++ b/src/firejail/preproc.c
@@ -104,16 +104,8 @@ void preproc_build_cp_command(void) {
104 preproc_mount_mnt_dir(); 104 preproc_mount_mnt_dir();
105 if (stat(RUN_CP_COMMAND, &s)) { 105 if (stat(RUN_CP_COMMAND, &s)) {
106 char* fname = realpath("/bin/cp", NULL); 106 char* fname = realpath("/bin/cp", NULL);
107 if (fname == NULL) { 107 if (fname == NULL || stat(fname, &s) || is_link(fname)) {
108 fprintf(stderr, "Error: /bin/cp not found\n"); 108 fprintf(stderr, "Error: invalid /bin/cp\n");
109 exit(1);
110 }
111 if (stat(fname, &s)) {
112 fprintf(stderr, "Error: /bin/cp not found\n");
113 exit(1);
114 }
115 if (is_link(fname)) {
116 fprintf(stderr, "Error: invalid /bin/cp file\n");
117 exit(1); 109 exit(1);
118 } 110 }
119 int rv = copy_file(fname, RUN_CP_COMMAND, 0, 0, 0755); 111 int rv = copy_file(fname, RUN_CP_COMMAND, 0, 0, 0755);
diff --git a/src/firejail/pulseaudio.c b/src/firejail/pulseaudio.c
index c76505591..6ec590eaa 100644
--- a/src/firejail/pulseaudio.c
+++ b/src/firejail/pulseaudio.c
@@ -130,7 +130,7 @@ void pulseaudio_init(void) {
130 int rv = mkdir(dir1, 0755); 130 int rv = mkdir(dir1, 0755);
131 if (rv == 0) { 131 if (rv == 0) {
132 if (set_perms(dir1, getuid(), getgid(), 0755)) 132 if (set_perms(dir1, getuid(), getgid(), 0755))
133 ; // do nothing 133 {;} // do nothing
134 } 134 }
135 } 135 }
136 free(dir1); 136 free(dir1);
@@ -140,7 +140,7 @@ void pulseaudio_init(void) {
140 int rv = mkdir(dir1, 0700); 140 int rv = mkdir(dir1, 0700);
141 if (rv == 0) { 141 if (rv == 0) {
142 if (set_perms(dir1, getuid(), getgid(), 0700)) 142 if (set_perms(dir1, getuid(), getgid(), 0700))
143 ; // do nothing 143 {;} // do nothing
144 } 144 }
145 } 145 }
146 free(dir1); 146 free(dir1);