aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2018-04-13 10:30:28 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2018-04-13 10:30:28 -0400
commit91e2867eaf93ad6cfdbbcc569efec464fad2005c (patch)
tree95d9b8f7d88f0a626705cd67b13cce9127b73c5d /src
parentseccomp postexec testing (diff)
downloadfirejail-91e2867eaf93ad6cfdbbcc569efec464fad2005c.tar.gz
firejail-91e2867eaf93ad6cfdbbcc569efec464fad2005c.tar.zst
firejail-91e2867eaf93ad6cfdbbcc569efec464fad2005c.zip
fix problem found by smitsohu
Diffstat (limited to 'src')
-rw-r--r--src/firejail/sandbox.c7
-rw-r--r--src/firejail/sbox.c14
-rw-r--r--src/firejail/x11.c18
3 files changed, 0 insertions, 39 deletions
diff --git a/src/firejail/sandbox.c b/src/firejail/sandbox.c
index 5c7f73fc1..e0cecda1b 100644
--- a/src/firejail/sandbox.c
+++ b/src/firejail/sandbox.c
@@ -1035,13 +1035,6 @@ int sandbox(void* sandbox_arg) {
1035 int rv = unlink(RUN_SECCOMP_MDWX); 1035 int rv = unlink(RUN_SECCOMP_MDWX);
1036 (void) rv; 1036 (void) rv;
1037 } 1037 }
1038
1039 if (arg_debug) {
1040 printf("\nSeccomp files:\n");
1041 int rv = system("ls -l /run/firejail/mnt/seccomp*\n");
1042 (void) rv;
1043 printf("\n");
1044 }
1045#endif 1038#endif
1046 1039
1047 //**************************************** 1040 //****************************************
diff --git a/src/firejail/sbox.c b/src/firejail/sbox.c
index cc2b08542..53df20a54 100644
--- a/src/firejail/sbox.c
+++ b/src/firejail/sbox.c
@@ -153,13 +153,6 @@ int sbox_run(unsigned filter, int num, ...) {
153 for (i = 3; i < max; i++) 153 for (i = 3; i < max; i++)
154 close(i); // close open files 154 close(i); // close open files
155 155
156#if 0
157 if (arg_debug) {
158 printf("sbox file descriptors:\n");
159 int rv = system("ls -l /proc/self/fd");
160 (void) rv;
161 }
162#endif
163 umask(027); 156 umask(027);
164 157
165 // apply filters 158 // apply filters
@@ -216,12 +209,5 @@ int sbox_run(unsigned filter, int num, ...) {
216 exit(1); 209 exit(1);
217 } 210 }
218 211
219#if 0
220printf("** sbox run out *********************************\n");
221system("ls -l /run/firejail/mnt\n");
222system("ls -l /proc/self/fd");
223printf("** sbox run out *********************************\n");
224#endif
225
226 return status; 212 return status;
227} 213}
diff --git a/src/firejail/x11.c b/src/firejail/x11.c
index 3903b4709..7040dea18 100644
--- a/src/firejail/x11.c
+++ b/src/firejail/x11.c
@@ -347,12 +347,6 @@ void x11_start_xvfb(int argc, char **argv) {
347 } 347 }
348 free(fname); 348 free(fname);
349 349
350 if (arg_debug) {
351 printf("X11 sockets: "); fflush(0);
352 int rv = system("ls /tmp/.X11-unix");
353 (void) rv;
354 }
355
356 assert(display_str); 350 assert(display_str);
357 setenv("DISPLAY", display_str, 1); 351 setenv("DISPLAY", display_str, 1);
358 // run attach command 352 // run attach command
@@ -582,12 +576,6 @@ void x11_start_xephyr(int argc, char **argv) {
582 } 576 }
583 free(fname); 577 free(fname);
584 578
585 if (arg_debug) {
586 printf("X11 sockets: "); fflush(0);
587 int rv = system("ls /tmp/.X11-unix");
588 (void) rv;
589 }
590
591 assert(display_str); 579 assert(display_str);
592 setenv("DISPLAY", display_str, 1); 580 setenv("DISPLAY", display_str, 1);
593 // run attach command 581 // run attach command
@@ -755,12 +743,6 @@ void x11_start_xpra_old(int argc, char **argv, int display, char *display_str) {
755 } 743 }
756 free(fname); 744 free(fname);
757 745
758 if (arg_debug) {
759 printf("X11 sockets: "); fflush(0);
760 int rv = system("ls /tmp/.X11-unix");
761 (void) rv;
762 }
763
764 // build attach command 746 // build attach command
765 char *attach_argv[] = { "xpra", "--title=\"firejail x11 sandbox\"", "attach", display_str, NULL }; 747 char *attach_argv[] = { "xpra", "--title=\"firejail x11 sandbox\"", "attach", display_str, NULL };
766 748