diff options
author | netblue30 <netblue30@yahoo.com> | 2016-03-26 09:43:36 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2016-03-26 09:43:36 -0400 |
commit | 0ebb4d08a39557d8f0c5806b91487df4325e0b87 (patch) | |
tree | dae39b3da408dc6ee45c1ca553cd2045124fb1c6 /src | |
parent | x11 xephyr support (diff) | |
download | firejail-0ebb4d08a39557d8f0c5806b91487df4325e0b87.tar.gz firejail-0ebb4d08a39557d8f0c5806b91487df4325e0b87.tar.zst firejail-0ebb4d08a39557d8f0c5806b91487df4325e0b87.zip |
compile fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/firecfg/main.c | 2 | ||||
-rw-r--r-- | src/firejail/x11.c | 11 |
2 files changed, 5 insertions, 8 deletions
diff --git a/src/firecfg/main.c b/src/firecfg/main.c index 0c6b278b5..66c7b203f 100644 --- a/src/firecfg/main.c +++ b/src/firecfg/main.c | |||
@@ -18,6 +18,8 @@ | |||
18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #define _GNU_SOURCE | ||
22 | #include <stdio.h> | ||
21 | #include <sys/types.h> | 23 | #include <sys/types.h> |
22 | #include <dirent.h> | 24 | #include <dirent.h> |
23 | #include <sys/types.h> | 25 | #include <sys/types.h> |
diff --git a/src/firejail/x11.c b/src/firejail/x11.c index 10e89ea7e..fb8f5efa2 100644 --- a/src/firejail/x11.c +++ b/src/firejail/x11.c | |||
@@ -166,7 +166,7 @@ void x11_start_xephyr(int argc, char **argv) { | |||
166 | pid_t server = 0; | 166 | pid_t server = 0; |
167 | 167 | ||
168 | 168 | ||
169 | // unfortunately, xpra does a number of wired things when started by root user!!! | 169 | // unfortunately, xpra does a number of weird things when started by root user!!! |
170 | if (getuid() == 0) { | 170 | if (getuid() == 0) { |
171 | fprintf(stderr, "Error: this feature is not available when running as root\n"); | 171 | fprintf(stderr, "Error: this feature is not available when running as root\n"); |
172 | exit(1); | 172 | exit(1); |
@@ -283,7 +283,7 @@ void x11_start_xpra(int argc, char **argv) { | |||
283 | pid_t server = 0; | 283 | pid_t server = 0; |
284 | 284 | ||
285 | 285 | ||
286 | // unfortunately, xpra does a number of wired things when started by root user!!! | 286 | // unfortunately, xpra does a number of weird things when started by root user!!! |
287 | if (getuid() == 0) { | 287 | if (getuid() == 0) { |
288 | fprintf(stderr, "Error: this feature is not available when running as root\n"); | 288 | fprintf(stderr, "Error: this feature is not available when running as root\n"); |
289 | exit(1); | 289 | exit(1); |
@@ -396,13 +396,8 @@ void x11_start_xpra(int argc, char **argv) { | |||
396 | 396 | ||
397 | void x11_start(int argc, char **argv) { | 397 | void x11_start(int argc, char **argv) { |
398 | EUID_ASSERT(); | 398 | EUID_ASSERT(); |
399 | int i; | ||
400 | struct stat s; | ||
401 | pid_t client = 0; | ||
402 | pid_t server = 0; | ||
403 | |||
404 | 399 | ||
405 | // unfortunately, xpra does a number of wired things when started by root user!!! | 400 | // unfortunately, xpra does a number of weird things when started by root user!!! |
406 | if (getuid() == 0) { | 401 | if (getuid() == 0) { |
407 | fprintf(stderr, "Error: this feature is not available when running as root\n"); | 402 | fprintf(stderr, "Error: this feature is not available when running as root\n"); |
408 | exit(1); | 403 | exit(1); |