diff options
-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/x11.c | 3 |
5 files changed, 26 insertions, 16 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 79d6b81e3..dd51b0a78 100644 --- a/src/firejail/env.c +++ b/src/firejail/env.c | |||
@@ -133,7 +133,8 @@ void env_defaults(void) { | |||
133 | errExit("setenv"); | 133 | errExit("setenv"); |
134 | 134 | ||
135 | // set the window title | 135 | // set the window title |
136 | printf("\033]0;firejail %s\007", cfg.window_title);fflush(0); | 136 | printf("\033]0;firejail %s\007", cfg.window_title); |
137 | fflush(0); | ||
137 | } | 138 | } |
138 | 139 | ||
139 | // parse and store the environment setting | 140 | // parse and store the environment setting |
diff --git a/src/firejail/main.c b/src/firejail/main.c index acae7c3dd..7b8b770ab 100644 --- a/src/firejail/main.c +++ b/src/firejail/main.c | |||
@@ -237,7 +237,8 @@ void check_user_namespace(void) { | |||
237 | stat("/proc/self/gid_map", &s3) == 0) | 237 | stat("/proc/self/gid_map", &s3) == 0) |
238 | arg_noroot = 1; | 238 | arg_noroot = 1; |
239 | else { | 239 | else { |
240 | fprintf(stderr, "Warning: user namespaces not available in the current kernel.\n"); | 240 | if (!arg_quiet || arg_debug) |
241 | fprintf(stderr, "Warning: user namespaces not available in the current kernel.\n"); | ||
241 | arg_noroot = 0; | 242 | arg_noroot = 0; |
242 | } | 243 | } |
243 | } | 244 | } |
@@ -1526,7 +1527,8 @@ int main(int argc, char **argv) { | |||
1526 | errExit("strdup"); | 1527 | errExit("strdup"); |
1527 | 1528 | ||
1528 | if (net_get_if_addr(intf->dev, &intf->ip, &intf->mask, intf->mac, &intf->mtu)) { | 1529 | if (net_get_if_addr(intf->dev, &intf->ip, &intf->mask, intf->mac, &intf->mtu)) { |
1529 | fprintf(stderr, "Warning: interface %s is not configured\n", intf->dev); | 1530 | if (!arg_quiet || arg_debug) |
1531 | fprintf(stderr, "Warning: interface %s is not configured\n", intf->dev); | ||
1530 | } | 1532 | } |
1531 | intf->configured = 1; | 1533 | intf->configured = 1; |
1532 | } | 1534 | } |
@@ -1945,8 +1947,10 @@ int main(int argc, char **argv) { | |||
1945 | } | 1947 | } |
1946 | 1948 | ||
1947 | // check trace configuration | 1949 | // check trace configuration |
1948 | if (arg_trace && arg_tracelog) | 1950 | if (arg_trace && arg_tracelog) { |
1949 | fprintf(stderr, "Warning: --trace and --tracelog are mutually exclusive; --tracelog disabled\n"); | 1951 | if (!arg_quiet || arg_debug) |
1952 | fprintf(stderr, "Warning: --trace and --tracelog are mutually exclusive; --tracelog disabled\n"); | ||
1953 | } | ||
1950 | 1954 | ||
1951 | // check user namespace (--noroot) options | 1955 | // check user namespace (--noroot) options |
1952 | if (arg_noroot) { | 1956 | if (arg_noroot) { |
@@ -2030,10 +2034,14 @@ int main(int argc, char **argv) { | |||
2030 | 2034 | ||
2031 | // use default.profile as the default | 2035 | // use default.profile as the default |
2032 | if (!custom_profile && !arg_noprofile) { | 2036 | if (!custom_profile && !arg_noprofile) { |
2033 | if (cfg.chrootdir) | 2037 | if (cfg.chrootdir) { |
2034 | fprintf(stderr, "Warning: default profile disabled by --chroot option\n"); | 2038 | if (!arg_quiet || arg_debug) |
2035 | else if (arg_overlay) | 2039 | fprintf(stderr, "Warning: default profile disabled by --chroot option\n"); |
2036 | fprintf(stderr, "Warning: default profile disabled by --overlay option\n"); | 2040 | } |
2041 | else if (arg_overlay) { | ||
2042 | if (!arg_quiet || arg_debug) | ||
2043 | fprintf(stderr, "Warning: default profile disabled by --overlay option\n"); | ||
2044 | } | ||
2037 | else { | 2045 | else { |
2038 | // try to load a default profile | 2046 | // try to load a default profile |
2039 | char *profile_name = DEFAULT_USER_PROFILE; | 2047 | char *profile_name = DEFAULT_USER_PROFILE; |
@@ -2096,11 +2104,13 @@ int main(int argc, char **argv) { | |||
2096 | errExit("pipe"); | 2104 | errExit("pipe"); |
2097 | 2105 | ||
2098 | if (arg_noroot && arg_overlay) { | 2106 | if (arg_noroot && arg_overlay) { |
2099 | fprintf(stderr, "Warning: --overlay and --noroot are mutually exclusive, noroot disabled\n"); | 2107 | if (!arg_quiet || arg_debug) |
2108 | fprintf(stderr, "Warning: --overlay and --noroot are mutually exclusive, noroot disabled\n"); | ||
2100 | arg_noroot = 0; | 2109 | arg_noroot = 0; |
2101 | } | 2110 | } |
2102 | else if (arg_noroot && cfg.chrootdir) { | 2111 | else if (arg_noroot && cfg.chrootdir) { |
2103 | fprintf(stderr, "Warning: --chroot and --noroot are mutually exclusive, noroot disabled\n"); | 2112 | if (!arg_quiet || arg_debug) |
2113 | fprintf(stderr, "Warning: --chroot and --noroot are mutually exclusive, noroot disabled\n"); | ||
2104 | arg_noroot = 0; | 2114 | arg_noroot = 0; |
2105 | } | 2115 | } |
2106 | 2116 | ||
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 | } |