aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README7
-rw-r--r--RELNOTES2
-rw-r--r--src/firejail/firejail.h3
-rw-r--r--src/firejail/main.c11
-rw-r--r--src/firejail/usage.c3
-rw-r--r--src/man/firejail.txt12
6 files changed, 32 insertions, 6 deletions
diff --git a/README b/README
index c3690df7f..5956a6b89 100644
--- a/README
+++ b/README
@@ -18,6 +18,8 @@ License: GPL v2
18Firejail Authors: 18Firejail Authors:
19 19
20netblue30 (netblue30@yahoo.com) 20netblue30 (netblue30@yahoo.com)
21Loïc Damien (https://github.com/dzamlo)
22 - small fixes
21Matthew Gyurgyik (https://github.com/pyther) 23Matthew Gyurgyik (https://github.com/pyther)
22 - rpm spec and several fixes 24 - rpm spec and several fixes
23greigdp (https://github.com/greigdp) 25greigdp (https://github.com/greigdp)
@@ -36,7 +38,10 @@ sarneaud (https://github.com/sarneaud)
36 - various enhancements and bug fixes 38 - various enhancements and bug fixes
37Patrick Toomey (http://sourceforge.net/u/ptoomey/profile/) 39Patrick Toomey (http://sourceforge.net/u/ptoomey/profile/)
38 - user namespace implementation 40 - user namespace implementation
39Reiner Herrmann - a number of build patches, man page fixes, Debian integration 41Reiner Herrmann
42 - a number of build patches
43 - man page fixes
44 - Debian and Ubuntu integration
40sshirokov (http://sourceforge.net/u/yshirokov/profile/) 45sshirokov (http://sourceforge.net/u/yshirokov/profile/)
41 - Patch to output "Reading profile" to stderr instead of stdout 46 - Patch to output "Reading profile" to stderr instead of stdout
42G4JC (http://sourceforge.net/u/gaming4jc/profile/) 47G4JC (http://sourceforge.net/u/gaming4jc/profile/)
diff --git a/RELNOTES b/RELNOTES
index 4ca531138..d70deb21a 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -3,6 +3,8 @@ firejail (0.9.31) baseline; urgency=low
3 * added --mtu option 3 * added --mtu option
4 * added --private-bin option 4 * added --private-bin option
5 * added --nosound option 5 * added --nosound option
6 * added --hostname option
7 * added --quiet option
6 * added seccomp errno support 8 * added seccomp errno support
7 * added FBReader default profile 9 * added FBReader default profile
8 * added Spotify default profile 10 * added Spotify default profile
diff --git a/src/firejail/firejail.h b/src/firejail/firejail.h
index 8260886a4..6a88d7e17 100644
--- a/src/firejail/firejail.h
+++ b/src/firejail/firejail.h
@@ -89,7 +89,8 @@ typedef struct config_t {
89 char *overlay_dir; 89 char *overlay_dir;
90 90
91 // networking 91 // networking
92 char *hostname; 92 char *name; // sandbox name
93 char *hostname; // host name
93 uint32_t defaultgw; // default gateway 94 uint32_t defaultgw; // default gateway
94 Bridge bridge0; 95 Bridge bridge0;
95 Bridge bridge1; 96 Bridge bridge1;
diff --git a/src/firejail/main.c b/src/firejail/main.c
index 3d3d43878..3d6d4cfb3 100644
--- a/src/firejail/main.c
+++ b/src/firejail/main.c
@@ -783,12 +783,19 @@ int main(int argc, char **argv) {
783 // hostname, etc 783 // hostname, etc
784 //************************************* 784 //*************************************
785 else if (strncmp(argv[i], "--name=", 7) == 0) { 785 else if (strncmp(argv[i], "--name=", 7) == 0) {
786 cfg.hostname = argv[i] + 7; 786 cfg.name = argv[i] + 7;
787 if (strlen(cfg.hostname) == 0) { 787 if (strlen(cfg.name) == 0) {
788 fprintf(stderr, "Error: please provide a name for sandbox\n"); 788 fprintf(stderr, "Error: please provide a name for sandbox\n");
789 return 1; 789 return 1;
790 } 790 }
791 } 791 }
792 else if (strncmp(argv[i], "--hostname=", 11) == 0) {
793 cfg.hostname = argv[i] + 11;
794 if (strlen(cfg.hostname) == 0) {
795 fprintf(stderr, "Error: please provide a hostname for sandbox\n");
796 return 1;
797 }
798 }
792 else if (strcmp(argv[i], "--nogroups") == 0) 799 else if (strcmp(argv[i], "--nogroups") == 0)
793 arg_nogroups = 1; 800 arg_nogroups = 1;
794 else if (strcmp(argv[i], "--noroot") == 0) { 801 else if (strcmp(argv[i], "--noroot") == 0) {
diff --git a/src/firejail/usage.c b/src/firejail/usage.c
index 8eda8208c..43e21433e 100644
--- a/src/firejail/usage.c
+++ b/src/firejail/usage.c
@@ -84,6 +84,7 @@ void usage(void) {
84 printf("\t--env=name=value - set environment variable in the new sandbox\n"); 84 printf("\t--env=name=value - set environment variable in the new sandbox\n");
85 85
86 printf("\t--help, -? - this help screen.\n\n"); 86 printf("\t--help, -? - this help screen.\n\n");
87 printf("\t--hostname=name - set sandbox hostname.\n\n");
87 88
88 printf("\t--interface=name - move interface in a new network namespace. Up to\n"); 89 printf("\t--interface=name - move interface in a new network namespace. Up to\n");
89 printf("\t\tfour --interface options can be sepcified.\n\n"); 90 printf("\t\tfour --interface options can be sepcified.\n\n");
@@ -101,7 +102,7 @@ void usage(void) {
101 printf("\t--list - list all sandboxes.\n\n"); 102 printf("\t--list - list all sandboxes.\n\n");
102 printf("\t--mac=xx:xx:xx:xx:xx:xx - set interface MAC address.\n\n"); 103 printf("\t--mac=xx:xx:xx:xx:xx:xx - set interface MAC address.\n\n");
103 printf("\t--mtu=number - set interface MTU.\n\n"); 104 printf("\t--mtu=number - set interface MTU.\n\n");
104 printf("\t--name=name - set sandbox hostname.\n\n"); 105 printf("\t--name=name - set sandbox name.\n\n");
105 printf("\t--net=bridgename - enable network namespaces and connect to this bridge\n"); 106 printf("\t--net=bridgename - enable network namespaces and connect to this bridge\n");
106 printf("\t\tdevice. Unless specified with option --ip and --defaultgw, an\n"); 107 printf("\t\tdevice. Unless specified with option --ip and --defaultgw, an\n");
107 printf("\t\tIP address and a default gateway will be assigned automatically\n"); 108 printf("\t\tIP address and a default gateway will be assigned automatically\n");
diff --git a/src/man/firejail.txt b/src/man/firejail.txt
index ae9d07bb8..e311c66b0 100644
--- a/src/man/firejail.txt
+++ b/src/man/firejail.txt
@@ -331,6 +331,16 @@ Print options end exit.
331 331
332 332
333.TP 333.TP
334\fB\-\-hostname=name
335Set sandbox hostname.
336.br
337
338.br
339Example:
340.br
341$ firejail \-\-hostname=officepc firefox
342
343.TP
334\fB\-\-interface=interface 344\fB\-\-interface=interface
335Move interface in a new network namespace. Up to four --interface options can be sepcified. 345Move interface in a new network namespace. Up to four --interface options can be sepcified.
336.br 346.br
@@ -454,7 +464,7 @@ $ firejail \-\-net=eth0 \-\-mtu=1492
454 464
455.TP 465.TP
456\fB\-\-name=name 466\fB\-\-name=name
457Set sandbox hostname. Several options, such as \-\-join and \-\-shutdown, can use 467Set sandbox name. Several options, such as \-\-join and \-\-shutdown, can use
458this name to identify a sandbox. 468this name to identify a sandbox.
459.br 469.br
460 470