aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/firejail/main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/firejail/main.c b/src/firejail/main.c
index 3cbaf658e..5a8f564f4 100644
--- a/src/firejail/main.c
+++ b/src/firejail/main.c
@@ -249,6 +249,9 @@ static void run_cmd_and_exit(int i, int argc, char **argv) {
249#ifndef HAVE_NETWORK 249#ifndef HAVE_NETWORK
250 printf("Networking support is disabled.\n"); 250 printf("Networking support is disabled.\n");
251#endif 251#endif
252#ifdef HAVE_NETWORK_RESTRICTED
253 printf("Networking support is allowed only to root user.\n");
254#endif
252#ifndef HAVE_USERNS 255#ifndef HAVE_USERNS
253 printf("User namespace support is disabled.\n"); 256 printf("User namespace support is disabled.\n");
254#endif 257#endif
@@ -1044,6 +1047,12 @@ int main(int argc, char **argv) {
1044 //************************************* 1047 //*************************************
1045#ifdef HAVE_NETWORK 1048#ifdef HAVE_NETWORK
1046 else if (strncmp(argv[i], "--interface=", 12) == 0) { 1049 else if (strncmp(argv[i], "--interface=", 12) == 0) {
1050#ifdef HAVE_NETWORK_RESTRICTED
1051 if (getuid() != 0) {
1052 fprintf(stderr, "Error: --interface is allowed only to root user\n");
1053 exit(1);
1054 }
1055#endif
1047 // checks 1056 // checks
1048 if (arg_nonetwork) { 1057 if (arg_nonetwork) {
1049 fprintf(stderr, "Error: --network=none and --interface are incompatible\n"); 1058 fprintf(stderr, "Error: --network=none and --interface are incompatible\n");