diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/faudit/dbus.c | 2 | ||||
-rw-r--r-- | src/firejail/checkcfg.c | 4 | ||||
-rw-r--r-- | src/firejail/env.c | 3 | ||||
-rw-r--r-- | src/firejail/main.c | 30 | ||||
-rw-r--r-- | src/firejail/network.txt | 2 | ||||
-rw-r--r-- | src/firejail/x11.c | 3 |
6 files changed, 27 insertions, 17 deletions
diff --git a/src/faudit/dbus.c b/src/faudit/dbus.c index 1edce5802..64f5d8ae4 100644 --- a/src/faudit/dbus.c +++ b/src/faudit/dbus.c | |||
@@ -63,8 +63,6 @@ void dbus_test(void) { | |||
63 | if (ptr) | 63 | if (ptr) |
64 | *ptr = '\0'; | 64 | *ptr = '\0'; |
65 | check_session_bus(sockfile); | 65 | check_session_bus(sockfile); |
66 | |||
67 | sockfile -= 13; | ||
68 | } | 66 | } |
69 | free(bus); | 67 | free(bus); |
70 | } | 68 | } |
diff --git a/src/firejail/checkcfg.c b/src/firejail/checkcfg.c index 3b60dafb6..019b54773 100644 --- a/src/firejail/checkcfg.c +++ b/src/firejail/checkcfg.c | |||
@@ -50,7 +50,7 @@ int checkcfg(int val) { | |||
50 | FILE *fp = fopen(fname, "r"); | 50 | FILE *fp = fopen(fname, "r"); |
51 | if (!fp) { | 51 | if (!fp) { |
52 | #ifdef HAVE_GLOBALCFG | 52 | #ifdef HAVE_GLOBALCFG |
53 | fprintf(stderr, "Warning: Firejail configuration file %s not found\n", fname); | 53 | fprintf(stderr, "Error: Firejail configuration file %s not found\n", fname); |
54 | exit(1); | 54 | exit(1); |
55 | #else | 55 | #else |
56 | initialized = 1; | 56 | initialized = 1; |
@@ -317,7 +317,7 @@ void print_compiletime_support(void) { | |||
317 | #endif | 317 | #endif |
318 | ); | 318 | ); |
319 | 319 | ||
320 | printf("\t- X11 snadboxing support is %s\n", | 320 | printf("\t- X11 sandboxing support is %s\n", |
321 | #ifdef HAVE_X11 | 321 | #ifdef HAVE_X11 |
322 | "enabled" | 322 | "enabled" |
323 | #else | 323 | #else |
diff --git a/src/firejail/env.c b/src/firejail/env.c index fdfa80ea8..328b19c5b 100644 --- a/src/firejail/env.c +++ b/src/firejail/env.c | |||
@@ -129,7 +129,8 @@ void env_defaults(void) { | |||
129 | errExit("setenv"); | 129 | errExit("setenv"); |
130 | 130 | ||
131 | // set the window title | 131 | // set the window title |
132 | printf("\033]0;firejail %s\007", cfg.window_title);fflush(0); | 132 | printf("\033]0;firejail %s\007", cfg.window_title); |
133 | fflush(0); | ||
133 | } | 134 | } |
134 | 135 | ||
135 | // parse and store the environment setting | 136 | // parse and store the environment setting |
diff --git a/src/firejail/main.c b/src/firejail/main.c index e0f2a676c..7cc9f9bf6 100644 --- a/src/firejail/main.c +++ b/src/firejail/main.c | |||
@@ -235,7 +235,8 @@ void check_user_namespace(void) { | |||
235 | stat("/proc/self/gid_map", &s3) == 0) | 235 | stat("/proc/self/gid_map", &s3) == 0) |
236 | arg_noroot = 1; | 236 | arg_noroot = 1; |
237 | else { | 237 | else { |
238 | fprintf(stderr, "Warning: user namespaces not available in the current kernel.\n"); | 238 | if (!arg_quiet || arg_debug) |
239 | fprintf(stderr, "Warning: user namespaces not available in the current kernel.\n"); | ||
239 | arg_noroot = 0; | 240 | arg_noroot = 0; |
240 | } | 241 | } |
241 | } | 242 | } |
@@ -1555,7 +1556,8 @@ int main(int argc, char **argv) { | |||
1555 | errExit("strdup"); | 1556 | errExit("strdup"); |
1556 | 1557 | ||
1557 | if (net_get_if_addr(intf->dev, &intf->ip, &intf->mask, intf->mac, &intf->mtu)) { | 1558 | if (net_get_if_addr(intf->dev, &intf->ip, &intf->mask, intf->mac, &intf->mtu)) { |
1558 | fprintf(stderr, "Warning: interface %s is not configured\n", intf->dev); | 1559 | if (!arg_quiet || arg_debug) |
1560 | fprintf(stderr, "Warning: interface %s is not configured\n", intf->dev); | ||
1559 | } | 1561 | } |
1560 | intf->configured = 1; | 1562 | intf->configured = 1; |
1561 | } | 1563 | } |
@@ -1974,8 +1976,10 @@ int main(int argc, char **argv) { | |||
1974 | } | 1976 | } |
1975 | 1977 | ||
1976 | // check trace configuration | 1978 | // check trace configuration |
1977 | if (arg_trace && arg_tracelog) | 1979 | if (arg_trace && arg_tracelog) { |
1978 | fprintf(stderr, "Warning: --trace and --tracelog are mutually exclusive; --tracelog disabled\n"); | 1980 | if (!arg_quiet || arg_debug) |
1981 | fprintf(stderr, "Warning: --trace and --tracelog are mutually exclusive; --tracelog disabled\n"); | ||
1982 | } | ||
1979 | 1983 | ||
1980 | // check user namespace (--noroot) options | 1984 | // check user namespace (--noroot) options |
1981 | if (arg_noroot) { | 1985 | if (arg_noroot) { |
@@ -2059,10 +2063,14 @@ int main(int argc, char **argv) { | |||
2059 | 2063 | ||
2060 | // use default.profile as the default | 2064 | // use default.profile as the default |
2061 | if (!custom_profile && !arg_noprofile) { | 2065 | if (!custom_profile && !arg_noprofile) { |
2062 | if (cfg.chrootdir) | 2066 | if (cfg.chrootdir) { |
2063 | fprintf(stderr, "Warning: default profile disabled by --chroot option\n"); | 2067 | if (!arg_quiet || arg_debug) |
2064 | else if (arg_overlay) | 2068 | fprintf(stderr, "Warning: default profile disabled by --chroot option\n"); |
2065 | fprintf(stderr, "Warning: default profile disabled by --overlay option\n"); | 2069 | } |
2070 | else if (arg_overlay) { | ||
2071 | if (!arg_quiet || arg_debug) | ||
2072 | fprintf(stderr, "Warning: default profile disabled by --overlay option\n"); | ||
2073 | } | ||
2066 | else { | 2074 | else { |
2067 | // try to load a default profile | 2075 | // try to load a default profile |
2068 | char *profile_name = DEFAULT_USER_PROFILE; | 2076 | char *profile_name = DEFAULT_USER_PROFILE; |
@@ -2125,11 +2133,13 @@ int main(int argc, char **argv) { | |||
2125 | errExit("pipe"); | 2133 | errExit("pipe"); |
2126 | 2134 | ||
2127 | if (arg_noroot && arg_overlay) { | 2135 | if (arg_noroot && arg_overlay) { |
2128 | fprintf(stderr, "Warning: --overlay and --noroot are mutually exclusive, noroot disabled\n"); | 2136 | if (!arg_quiet || arg_debug) |
2137 | fprintf(stderr, "Warning: --overlay and --noroot are mutually exclusive, noroot disabled\n"); | ||
2129 | arg_noroot = 0; | 2138 | arg_noroot = 0; |
2130 | } | 2139 | } |
2131 | else if (arg_noroot && cfg.chrootdir) { | 2140 | else if (arg_noroot && cfg.chrootdir) { |
2132 | fprintf(stderr, "Warning: --chroot and --noroot are mutually exclusive, noroot disabled\n"); | 2141 | if (!arg_quiet || arg_debug) |
2142 | fprintf(stderr, "Warning: --chroot and --noroot are mutually exclusive, noroot disabled\n"); | ||
2133 | arg_noroot = 0; | 2143 | arg_noroot = 0; |
2134 | } | 2144 | } |
2135 | 2145 | ||
diff --git a/src/firejail/network.txt b/src/firejail/network.txt index 673d5b941..f6df0f485 100644 --- a/src/firejail/network.txt +++ b/src/firejail/network.txt | |||
@@ -13,7 +13,7 @@ net_configure_bridge(br, device) { | |||
13 | } | 13 | } |
14 | 14 | ||
15 | net_configure_sandbox_ip(br) { | 15 | net_configure_sandbox_ip(br) { |
16 | if br->ip_snadbox | 16 | if br->ip_sandbox |
17 | check br->ipsandbox inside the bridge network | 17 | check br->ipsandbox inside the bridge network |
18 | arp_check(br->ipsandbox) // send an arp req to check if anybody else is using this address | 18 | arp_check(br->ipsandbox) // send an arp req to check if anybody else is using this address |
19 | else | 19 | else |
diff --git a/src/firejail/x11.c b/src/firejail/x11.c index 58908e9df..90ce1fc36 100644 --- a/src/firejail/x11.c +++ b/src/firejail/x11.c | |||
@@ -458,7 +458,8 @@ void x11_start_xpra(int argc, char **argv) { | |||
458 | if (jail < 0) | 458 | if (jail < 0) |
459 | errExit("fork"); | 459 | errExit("fork"); |
460 | if (jail == 0) { | 460 | if (jail == 0) { |
461 | execvp(firejail_argv[0], firejail_argv); | 461 | if (firejail_argv[0]) // shut up llvm scan-build |
462 | execvp(firejail_argv[0], firejail_argv); | ||
462 | perror("execvp"); | 463 | perror("execvp"); |
463 | exit(1); | 464 | exit(1); |
464 | } | 465 | } |