aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bash_completion/Makefile7
-rw-r--r--src/etc-cleanup/Makefile3
-rw-r--r--src/fbuilder/Makefile3
-rw-r--r--src/fcopy/Makefile3
-rw-r--r--src/fids/Makefile3
-rw-r--r--src/firecfg/Makefile3
-rw-r--r--src/firecfg/firecfg.config7
-rw-r--r--src/firejail/Makefile3
-rw-r--r--src/firejail/main.c29
-rw-r--r--src/firejail/no_sandbox.c2
-rw-r--r--src/firejail/profile.c27
-rw-r--r--src/firejail/util.c39
-rw-r--r--src/firemon/Makefile3
-rw-r--r--src/fldd/Makefile3
-rw-r--r--src/fnet/Makefile3
-rw-r--r--src/fnetfilter/Makefile3
-rw-r--r--src/fnettrace-dns/Makefile3
-rw-r--r--src/fnettrace-icmp/Makefile3
-rw-r--r--src/fnettrace-sni/Makefile3
-rw-r--r--src/fnettrace/Makefile3
-rw-r--r--src/fsec-optimize/Makefile3
-rw-r--r--src/fsec-print/Makefile3
-rw-r--r--src/fseccomp/Makefile3
-rw-r--r--src/ftee/Makefile3
-rw-r--r--src/fzenity/Makefile3
-rw-r--r--src/jailcheck/Makefile3
-rw-r--r--src/lib/Makefile3
-rw-r--r--src/libpostexecseccomp/Makefile3
-rw-r--r--src/libtrace/Makefile3
-rw-r--r--src/libtracelog/Makefile3
-rw-r--r--src/man/Makefile7
-rw-r--r--src/man/firejail.txt24
-rw-r--r--src/profstats/Makefile3
-rw-r--r--src/zsh_completion/Makefile7
34 files changed, 173 insertions, 51 deletions
diff --git a/src/bash_completion/Makefile b/src/bash_completion/Makefile
index e787a7b92..6d5c45532 100644
--- a/src/bash_completion/Makefile
+++ b/src/bash_completion/Makefile
@@ -1,9 +1,12 @@
1.PHONY: all 1.SUFFIXES:
2all: firejail.bash_completion 2MAKEFLAGS += -r
3 3
4ROOT = ../.. 4ROOT = ../..
5-include $(ROOT)/config.mk 5-include $(ROOT)/config.mk
6 6
7.PHONY: all
8all: firejail.bash_completion
9
7firejail.bash_completion: firejail.bash_completion.in $(ROOT)/config.mk 10firejail.bash_completion: firejail.bash_completion.in $(ROOT)/config.mk
8 gawk -f ../man/preproc.awk -- $(MANFLAGS) < $< > $@.tmp 11 gawk -f ../man/preproc.awk -- $(MANFLAGS) < $< > $@.tmp
9 sed "s|_SYSCONFDIR_|$(sysconfdir)|" < $@.tmp > $@ 12 sed "s|_SYSCONFDIR_|$(sysconfdir)|" < $@.tmp > $@
diff --git a/src/etc-cleanup/Makefile b/src/etc-cleanup/Makefile
index 10c28cd76..7c542c4a9 100644
--- a/src/etc-cleanup/Makefile
+++ b/src/etc-cleanup/Makefile
@@ -1,3 +1,6 @@
1.SUFFIXES:
2MAKEFLAGS += -r
3
1ROOT = ../.. 4ROOT = ../..
2-include $(ROOT)/config.mk 5-include $(ROOT)/config.mk
3 6
diff --git a/src/fbuilder/Makefile b/src/fbuilder/Makefile
index ad73e8960..803ea18a3 100644
--- a/src/fbuilder/Makefile
+++ b/src/fbuilder/Makefile
@@ -1,3 +1,6 @@
1.SUFFIXES:
2MAKEFLAGS += -r
3
1ROOT = ../.. 4ROOT = ../..
2-include $(ROOT)/config.mk 5-include $(ROOT)/config.mk
3 6
diff --git a/src/fcopy/Makefile b/src/fcopy/Makefile
index 27054627c..29ea719a3 100644
--- a/src/fcopy/Makefile
+++ b/src/fcopy/Makefile
@@ -1,3 +1,6 @@
1.SUFFIXES:
2MAKEFLAGS += -r
3
1ROOT = ../.. 4ROOT = ../..
2-include $(ROOT)/config.mk 5-include $(ROOT)/config.mk
3 6
diff --git a/src/fids/Makefile b/src/fids/Makefile
index 44ea396d7..1aaac5c75 100644
--- a/src/fids/Makefile
+++ b/src/fids/Makefile
@@ -1,3 +1,6 @@
1.SUFFIXES:
2MAKEFLAGS += -r
3
1ROOT = ../.. 4ROOT = ../..
2-include $(ROOT)/config.mk 5-include $(ROOT)/config.mk
3 6
diff --git a/src/firecfg/Makefile b/src/firecfg/Makefile
index 05cc088f4..c9489e3a4 100644
--- a/src/firecfg/Makefile
+++ b/src/firecfg/Makefile
@@ -1,3 +1,6 @@
1.SUFFIXES:
2MAKEFLAGS += -r
3
1ROOT = ../.. 4ROOT = ../..
2-include $(ROOT)/config.mk 5-include $(ROOT)/config.mk
3 6
diff --git a/src/firecfg/firecfg.config b/src/firecfg/firecfg.config
index 1e996ef72..fdda5c2c7 100644
--- a/src/firecfg/firecfg.config
+++ b/src/firecfg/firecfg.config
@@ -895,9 +895,10 @@ vivaldi-beta
895vivaldi-snapshot 895vivaldi-snapshot
896vivaldi-stable 896vivaldi-stable
897vlc 897vlc
898vmware 898#vmplayer - unable to install kernel modules (see #5861)
899vmware-player 899#vmware - unable to install kernel modules (see #5861)
900vmware-workstation 900#vmware-player - unable to install kernel modules (see #5861)
901#vmware-workstation - unable to install kernel modules (see #5861)
901vscodium 902vscodium
902vulturesclaw 903vulturesclaw
903vultureseye 904vultureseye
diff --git a/src/firejail/Makefile b/src/firejail/Makefile
index 47edc5ac6..064373588 100644
--- a/src/firejail/Makefile
+++ b/src/firejail/Makefile
@@ -1,3 +1,6 @@
1.SUFFIXES:
2MAKEFLAGS += -r
3
1ROOT = ../.. 4ROOT = ../..
2-include $(ROOT)/config.mk 5-include $(ROOT)/config.mk
3 6
diff --git a/src/firejail/main.c b/src/firejail/main.c
index 1835d8de2..070eb47f3 100644
--- a/src/firejail/main.c
+++ b/src/firejail/main.c
@@ -2187,34 +2187,21 @@ int main(int argc, char **argv, char **envp) {
2187 else if (strncmp(argv[i], "--name=", 7) == 0) { 2187 else if (strncmp(argv[i], "--name=", 7) == 0) {
2188 cfg.name = argv[i] + 7; 2188 cfg.name = argv[i] + 7;
2189 if (strlen(cfg.name) == 0) { 2189 if (strlen(cfg.name) == 0) {
2190 fprintf(stderr, "Error: please provide a name for sandbox\n"); 2190 fprintf(stderr, "Error: invalid sandbox name: cannot be empty\n");
2191 return 1; 2191 return 1;
2192 } 2192 }
2193 if (invalid_name(cfg.name) || has_cntrl_chars(cfg.name)) { 2193 if (invalid_name(cfg.name)) {
2194 fprintf(stderr, "Error: invalid sandbox name\n"); 2194 fprintf(stderr, "Error: invalid sandbox name\n");
2195 return 1; 2195 return 1;
2196 } 2196 }
2197 } 2197 }
2198 else if (strncmp(argv[i], "--hostname=", 11) == 0) { 2198 else if (strncmp(argv[i], "--hostname=", 11) == 0) {
2199 cfg.hostname = argv[i] + 11; 2199 cfg.hostname = argv[i] + 11;
2200 size_t len = strlen(cfg.hostname); 2200 if (strlen(cfg.hostname) == 0) {
2201 if (len == 0 || len > 253) { 2201 fprintf(stderr, "Error: invalid hostname: cannot be empty\n");
2202 fprintf(stderr, "Error: please provide a valid hostname for sandbox, with maximum length of 253 ASCII characters\n");
2203 return 1; 2202 return 1;
2204 } 2203 }
2205 int invalid = invalid_name(cfg.hostname); 2204 if (invalid_name(cfg.hostname)) {
2206 char* hostname = cfg.hostname;
2207 while (*hostname && !invalid) {
2208 invalid = invalid || !(
2209 (*hostname >= 'a' && *hostname <= 'z') ||
2210 (*hostname >= 'A' && *hostname <= 'Z') ||
2211 (*hostname >= '0' && *hostname <= '9') ||
2212 (*hostname == '-' || *hostname == '.'));
2213 hostname++;
2214 }
2215 invalid = invalid || cfg.hostname[0] == '-'; // must not start with -
2216 invalid = invalid || cfg.hostname[len - 1] == '-'; // must not end with -
2217 if (invalid) {
2218 fprintf(stderr, "Error: invalid hostname\n"); 2205 fprintf(stderr, "Error: invalid hostname\n");
2219 return 1; 2206 return 1;
2220 } 2207 }
@@ -2847,7 +2834,11 @@ int main(int argc, char **argv, char **envp) {
2847 // set sandbox name and start normally 2834 // set sandbox name and start normally
2848 cfg.name = argv[i] + 16; 2835 cfg.name = argv[i] + 16;
2849 if (strlen(cfg.name) == 0) { 2836 if (strlen(cfg.name) == 0) {
2850 fprintf(stderr, "Error: please provide a name for sandbox\n"); 2837 fprintf(stderr, "Error: invalid sandbox name: cannot be empty\n");
2838 return 1;
2839 }
2840 if (invalid_name(cfg.name)) {
2841 fprintf(stderr, "Error: invalid sandbox name\n");
2851 return 1; 2842 return 1;
2852 } 2843 }
2853 } 2844 }
diff --git a/src/firejail/no_sandbox.c b/src/firejail/no_sandbox.c
index 22ee9dc3c..9c5e3ee58 100644
--- a/src/firejail/no_sandbox.c
+++ b/src/firejail/no_sandbox.c
@@ -120,7 +120,7 @@ int check_kernel_procs(void) {
120 120
121 // read file 121 // read file
122 char buf[100]; 122 char buf[100];
123 if (fgets(buf, 10, fp) == NULL) { 123 if (fgets(buf, 100, fp) == NULL) {
124 fwarning("cannot read %s\n", fname); 124 fwarning("cannot read %s\n", fname);
125 fclose(fp); 125 fclose(fp);
126 free(fname); 126 free(fname);
diff --git a/src/firejail/profile.c b/src/firejail/profile.c
index 202bcf4da..ae881664b 100644
--- a/src/firejail/profile.c
+++ b/src/firejail/profile.c
@@ -326,22 +326,13 @@ int profile_check_line(char *ptr, int lineno, const char *fname) {
326 } 326 }
327 // sandbox name 327 // sandbox name
328 else if (strncmp(ptr, "name ", 5) == 0) { 328 else if (strncmp(ptr, "name ", 5) == 0) {
329 int only_numbers = 1;
330 cfg.name = ptr + 5; 329 cfg.name = ptr + 5;
331 if (strlen(cfg.name) == 0) { 330 if (strlen(cfg.name) == 0) {
332 fprintf(stderr, "Error: invalid sandbox name\n"); 331 fprintf(stderr, "Error: invalid sandbox name: cannot be empty\n");
333 exit(1); 332 exit(1);
334 } 333 }
335 const char *c = cfg.name; 334 if (invalid_name(cfg.name)) {
336 while (*c) { 335 fprintf(stderr, "Error: invalid sandbox name\n");
337 if (!isdigit(*c)) {
338 only_numbers = 0;
339 break;
340 }
341 ++c;
342 }
343 if (only_numbers) {
344 fprintf(stderr, "Error: invalid sandbox name: it only contains digits\n");
345 exit(1); 336 exit(1);
346 } 337 }
347 return 0; 338 return 0;
@@ -1165,6 +1156,14 @@ int profile_check_line(char *ptr, int lineno, const char *fname) {
1165 // hostname 1156 // hostname
1166 if (strncmp(ptr, "hostname ", 9) == 0) { 1157 if (strncmp(ptr, "hostname ", 9) == 0) {
1167 cfg.hostname = ptr + 9; 1158 cfg.hostname = ptr + 9;
1159 if (strlen(cfg.hostname) == 0) {
1160 fprintf(stderr, "Error: invalid hostname: cannot be empty\n");
1161 exit(1);
1162 }
1163 if (invalid_name(cfg.hostname)) {
1164 fprintf(stderr, "Error: invalid hostname\n");
1165 exit(1);
1166 }
1168 return 0; 1167 return 0;
1169 } 1168 }
1170 1169
@@ -1647,6 +1646,10 @@ int profile_check_line(char *ptr, int lineno, const char *fname) {
1647 // set sandbox name and start normally 1646 // set sandbox name and start normally
1648 cfg.name = ptr + 14; 1647 cfg.name = ptr + 14;
1649 if (strlen(cfg.name) == 0) { 1648 if (strlen(cfg.name) == 0) {
1649 fprintf(stderr, "Error: invalid sandbox name: cannot be empty\n");
1650 exit(1);
1651 }
1652 if (invalid_name(cfg.name)) {
1650 fprintf(stderr, "Error: invalid sandbox name\n"); 1653 fprintf(stderr, "Error: invalid sandbox name\n");
1651 exit(1); 1654 exit(1);
1652 } 1655 }
diff --git a/src/firejail/util.c b/src/firejail/util.c
index a0af3d4bf..555486916 100644
--- a/src/firejail/util.c
+++ b/src/firejail/util.c
@@ -1476,23 +1476,46 @@ int ascii_isxdigit(unsigned char c) {
1476 return ret; 1476 return ret;
1477} 1477}
1478 1478
1479// allow strict ASCII letters and numbers; names with only numbers are rejected; spaces are rejected 1479// Note: Keep this in sync with NAME VALIDATION in src/man/firejail.txt.
1480//
1481// Allow only ASCII letters, digits and a few special characters; names with
1482// only numbers are rejected; spaces and control characters are rejected.
1480int invalid_name(const char *name) { 1483int invalid_name(const char *name) {
1481 const char *c = name; 1484 const char *c = name;
1482
1483 int only_numbers = 1; 1485 int only_numbers = 1;
1486
1487 if (strlen(name) > 253)
1488 return 1;
1489
1490 // must start with alnum
1491 if (!ascii_isalnum(*c))
1492 return 1;
1493 if (!ascii_isdigit(*c))
1494 only_numbers = 0;
1495 ++c;
1496
1484 while (*c) { 1497 while (*c) {
1485 if (!ascii_isalnum(*c)) 1498 switch (*c) {
1486 return 1; 1499 case '-':
1487 if (!ascii_isdigit(*c)) 1500 case '.':
1501 case '_':
1488 only_numbers = 0; 1502 only_numbers = 0;
1503 break;
1504 default:
1505 if (!ascii_isalnum(*c))
1506 return 1;
1507 if (!ascii_isdigit(*c))
1508 only_numbers = 0;
1509 }
1489 ++c; 1510 ++c;
1490 } 1511 }
1491 if (only_numbers) 1512
1513 // must end with alnum
1514 --c;
1515 if (!ascii_isalnum(*c))
1492 return 1; 1516 return 1;
1493 1517
1494 // restrict name to 64 chars max 1518 if (only_numbers)
1495 if (strlen(name) > 64)
1496 return 1; 1519 return 1;
1497 1520
1498 return 0; 1521 return 0;
diff --git a/src/firemon/Makefile b/src/firemon/Makefile
index 433e4267d..514eb98eb 100644
--- a/src/firemon/Makefile
+++ b/src/firemon/Makefile
@@ -1,3 +1,6 @@
1.SUFFIXES:
2MAKEFLAGS += -r
3
1ROOT = ../.. 4ROOT = ../..
2-include $(ROOT)/config.mk 5-include $(ROOT)/config.mk
3 6
diff --git a/src/fldd/Makefile b/src/fldd/Makefile
index 0c127af55..35ce019a7 100644
--- a/src/fldd/Makefile
+++ b/src/fldd/Makefile
@@ -1,3 +1,6 @@
1.SUFFIXES:
2MAKEFLAGS += -r
3
1ROOT = ../.. 4ROOT = ../..
2-include $(ROOT)/config.mk 5-include $(ROOT)/config.mk
3 6
diff --git a/src/fnet/Makefile b/src/fnet/Makefile
index 91de109fa..a40d69b11 100644
--- a/src/fnet/Makefile
+++ b/src/fnet/Makefile
@@ -1,3 +1,6 @@
1.SUFFIXES:
2MAKEFLAGS += -r
3
1ROOT = ../.. 4ROOT = ../..
2-include $(ROOT)/config.mk 5-include $(ROOT)/config.mk
3 6
diff --git a/src/fnetfilter/Makefile b/src/fnetfilter/Makefile
index 506d287ab..fbae2e027 100644
--- a/src/fnetfilter/Makefile
+++ b/src/fnetfilter/Makefile
@@ -1,3 +1,6 @@
1.SUFFIXES:
2MAKEFLAGS += -r
3
1ROOT = ../.. 4ROOT = ../..
2-include $(ROOT)/config.mk 5-include $(ROOT)/config.mk
3 6
diff --git a/src/fnettrace-dns/Makefile b/src/fnettrace-dns/Makefile
index 36542f567..3c825467c 100644
--- a/src/fnettrace-dns/Makefile
+++ b/src/fnettrace-dns/Makefile
@@ -1,3 +1,6 @@
1.SUFFIXES:
2MAKEFLAGS += -r
3
1ROOT = ../.. 4ROOT = ../..
2-include $(ROOT)/config.mk 5-include $(ROOT)/config.mk
3 6
diff --git a/src/fnettrace-icmp/Makefile b/src/fnettrace-icmp/Makefile
index 12ae42e9a..9e94fa144 100644
--- a/src/fnettrace-icmp/Makefile
+++ b/src/fnettrace-icmp/Makefile
@@ -1,3 +1,6 @@
1.SUFFIXES:
2MAKEFLAGS += -r
3
1ROOT = ../.. 4ROOT = ../..
2-include $(ROOT)/config.mk 5-include $(ROOT)/config.mk
3 6
diff --git a/src/fnettrace-sni/Makefile b/src/fnettrace-sni/Makefile
index 8d9a437d5..21dfde3d3 100644
--- a/src/fnettrace-sni/Makefile
+++ b/src/fnettrace-sni/Makefile
@@ -1,3 +1,6 @@
1.SUFFIXES:
2MAKEFLAGS += -r
3
1ROOT = ../.. 4ROOT = ../..
2-include $(ROOT)/config.mk 5-include $(ROOT)/config.mk
3 6
diff --git a/src/fnettrace/Makefile b/src/fnettrace/Makefile
index 952036ad3..a952a84a4 100644
--- a/src/fnettrace/Makefile
+++ b/src/fnettrace/Makefile
@@ -1,3 +1,6 @@
1.SUFFIXES:
2MAKEFLAGS += -r
3
1ROOT = ../.. 4ROOT = ../..
2-include $(ROOT)/config.mk 5-include $(ROOT)/config.mk
3 6
diff --git a/src/fsec-optimize/Makefile b/src/fsec-optimize/Makefile
index ce65f4719..40511bdaa 100644
--- a/src/fsec-optimize/Makefile
+++ b/src/fsec-optimize/Makefile
@@ -1,3 +1,6 @@
1.SUFFIXES:
2MAKEFLAGS += -r
3
1ROOT = ../.. 4ROOT = ../..
2-include $(ROOT)/config.mk 5-include $(ROOT)/config.mk
3 6
diff --git a/src/fsec-print/Makefile b/src/fsec-print/Makefile
index cbe061d45..6f09e9161 100644
--- a/src/fsec-print/Makefile
+++ b/src/fsec-print/Makefile
@@ -1,3 +1,6 @@
1.SUFFIXES:
2MAKEFLAGS += -r
3
1ROOT = ../.. 4ROOT = ../..
2-include $(ROOT)/config.mk 5-include $(ROOT)/config.mk
3 6
diff --git a/src/fseccomp/Makefile b/src/fseccomp/Makefile
index 1b8d0bb48..bd5c92113 100644
--- a/src/fseccomp/Makefile
+++ b/src/fseccomp/Makefile
@@ -1,3 +1,6 @@
1.SUFFIXES:
2MAKEFLAGS += -r
3
1ROOT = ../.. 4ROOT = ../..
2-include $(ROOT)/config.mk 5-include $(ROOT)/config.mk
3 6
diff --git a/src/ftee/Makefile b/src/ftee/Makefile
index 2f26ab900..8b4e7fdf4 100644
--- a/src/ftee/Makefile
+++ b/src/ftee/Makefile
@@ -1,3 +1,6 @@
1.SUFFIXES:
2MAKEFLAGS += -r
3
1ROOT = ../.. 4ROOT = ../..
2-include $(ROOT)/config.mk 5-include $(ROOT)/config.mk
3 6
diff --git a/src/fzenity/Makefile b/src/fzenity/Makefile
index aeb862d9b..6b93886f5 100644
--- a/src/fzenity/Makefile
+++ b/src/fzenity/Makefile
@@ -1,3 +1,6 @@
1.SUFFIXES:
2MAKEFLAGS += -r
3
1ROOT = ../.. 4ROOT = ../..
2-include $(ROOT)/config.mk 5-include $(ROOT)/config.mk
3 6
diff --git a/src/jailcheck/Makefile b/src/jailcheck/Makefile
index e3b84fbf3..029fd422b 100644
--- a/src/jailcheck/Makefile
+++ b/src/jailcheck/Makefile
@@ -1,3 +1,6 @@
1.SUFFIXES:
2MAKEFLAGS += -r
3
1ROOT = ../.. 4ROOT = ../..
2-include $(ROOT)/config.mk 5-include $(ROOT)/config.mk
3 6
diff --git a/src/lib/Makefile b/src/lib/Makefile
index f5b92e389..e359bba08 100644
--- a/src/lib/Makefile
+++ b/src/lib/Makefile
@@ -1,3 +1,6 @@
1.SUFFIXES:
2MAKEFLAGS += -r
3
1ROOT = ../.. 4ROOT = ../..
2-include $(ROOT)/config.mk 5-include $(ROOT)/config.mk
3 6
diff --git a/src/libpostexecseccomp/Makefile b/src/libpostexecseccomp/Makefile
index 62e167b73..874de098e 100644
--- a/src/libpostexecseccomp/Makefile
+++ b/src/libpostexecseccomp/Makefile
@@ -1,3 +1,6 @@
1.SUFFIXES:
2MAKEFLAGS += -r
3
1ROOT = ../.. 4ROOT = ../..
2-include $(ROOT)/config.mk 5-include $(ROOT)/config.mk
3 6
diff --git a/src/libtrace/Makefile b/src/libtrace/Makefile
index d45b3e2f6..d261828ea 100644
--- a/src/libtrace/Makefile
+++ b/src/libtrace/Makefile
@@ -1,3 +1,6 @@
1.SUFFIXES:
2MAKEFLAGS += -r
3
1ROOT = ../.. 4ROOT = ../..
2-include $(ROOT)/config.mk 5-include $(ROOT)/config.mk
3 6
diff --git a/src/libtracelog/Makefile b/src/libtracelog/Makefile
index bfc5adddc..5e14a5dbe 100644
--- a/src/libtracelog/Makefile
+++ b/src/libtracelog/Makefile
@@ -1,3 +1,6 @@
1.SUFFIXES:
2MAKEFLAGS += -r
3
1ROOT = ../.. 4ROOT = ../..
2-include $(ROOT)/config.mk 5-include $(ROOT)/config.mk
3 6
diff --git a/src/man/Makefile b/src/man/Makefile
index 283822d1f..ce55ffd34 100644
--- a/src/man/Makefile
+++ b/src/man/Makefile
@@ -1,9 +1,12 @@
1.PHONY: all 1.SUFFIXES:
2all: firecfg.man firejail.man firejail-login.man firejail-users.man firejail-profile.man firemon.man jailcheck.man 2MAKEFLAGS += -r
3 3
4ROOT = ../.. 4ROOT = ../..
5-include $(ROOT)/config.mk 5-include $(ROOT)/config.mk
6 6
7.PHONY: all
8all: firecfg.man firejail.man firejail-login.man firejail-users.man firejail-profile.man firemon.man jailcheck.man
9
7%.man: %.txt $(ROOT)/config.mk 10%.man: %.txt $(ROOT)/config.mk
8 gawk -f ./preproc.awk -- $(MANFLAGS) < $< > $@ 11 gawk -f ./preproc.awk -- $(MANFLAGS) < $< > $@
9 12
diff --git a/src/man/firejail.txt b/src/man/firejail.txt
index 586ef9852..19fc94ebd 100644
--- a/src/man/firejail.txt
+++ b/src/man/firejail.txt
@@ -876,6 +876,8 @@ Print options end exit.
876\fB\-\-hostname=name 876\fB\-\-hostname=name
877Set sandbox hostname. 877Set sandbox hostname.
878.br 878.br
879For valid names, see the \fBNAME VALIDATION\fR section.
880.br
879 881
880.br 882.br
881Example: 883Example:
@@ -1180,7 +1182,9 @@ Switching to pid 1932, the first child process inside the sandbox
1180.TP 1182.TP
1181\fB\-\-join-or-start=name 1183\fB\-\-join-or-start=name
1182Join the sandbox identified by name or start a new one. 1184Join the sandbox identified by name or start a new one.
1183Same as "firejail --join=name" if sandbox with specified name exists, otherwise same as "firejail --name=name ..." 1185Same as "firejail --join=name" if sandbox with specified name exists, otherwise
1186same as "firejail --name=name ...".
1187See \fB\-\-name\fR for details.
1184.br 1188.br
1185Note that in contrary to other join options there is respective profile option. 1189Note that in contrary to other join options there is respective profile option.
1186 1190
@@ -1340,8 +1344,13 @@ $ firejail \-\-net=eth0 \-\-mtu=1492
1340\fB\-\-name=name 1344\fB\-\-name=name
1341Set sandbox name. Several options, such as \-\-join and \-\-shutdown, can use 1345Set sandbox name. Several options, such as \-\-join and \-\-shutdown, can use
1342this name to identify a sandbox. 1346this name to identify a sandbox.
1343The name cannot contain only digits, as that is treated as a PID in the other options, such as in \-\-join. 1347The name cannot contain only digits, as that is treated as a PID in the other
1348options, such as in \-\-join.
1349.br
1350For valid names, see the \fBNAME VALIDATION\fR section.
1351.br
1344 1352
1353.br
1345In case the name supplied by the user is already in use by another sandbox, Firejail will assign a 1354In case the name supplied by the user is already in use by another sandbox, Firejail will assign a
1346new name as "name-PID", where PID is the process ID of the sandbox. This functionality 1355new name as "name-PID", where PID is the process ID of the sandbox. This functionality
1347can be disabled at run time in /etc/firejail/firejail.config file, by setting "name-change" flag to "no". 1356can be disabled at run time in /etc/firejail/firejail.config file, by setting "name-change" flag to "no".
@@ -3296,6 +3305,17 @@ Example:
3296$ firejail --net=eth0 --x11=xephyr --xephyr-screen=640x480 firefox 3305$ firejail --net=eth0 --x11=xephyr --xephyr-screen=640x480 firefox
3297.br 3306.br
3298#endif 3307#endif
3308.\" Note: Keep this in sync with invalid_name() in src/firejail/util.c.
3309.SH NAME VALIDATION
3310For simplicity, the same name validation is used for multiple options.
3311Rules:
3312.PP
3313The name must be 1-253 characters long.
3314The name can only contain ASCII letters, digits and the special characters
3315"-._" (that is, the name cannot contain spaces or control characters).
3316The name cannot contain only digits.
3317The first and last characters must be an ASCII letter or digit and the name
3318may contain special characters in the middle.
3299#ifdef HAVE_APPARMOR 3319#ifdef HAVE_APPARMOR
3300.SH APPARMOR 3320.SH APPARMOR
3301.TP 3321.TP
diff --git a/src/profstats/Makefile b/src/profstats/Makefile
index 47b39e76c..936b575e1 100644
--- a/src/profstats/Makefile
+++ b/src/profstats/Makefile
@@ -1,3 +1,6 @@
1.SUFFIXES:
2MAKEFLAGS += -r
3
1ROOT = ../.. 4ROOT = ../..
2-include $(ROOT)/config.mk 5-include $(ROOT)/config.mk
3 6
diff --git a/src/zsh_completion/Makefile b/src/zsh_completion/Makefile
index d7bc1038a..fab53ca0a 100644
--- a/src/zsh_completion/Makefile
+++ b/src/zsh_completion/Makefile
@@ -1,9 +1,12 @@
1.PHONY: all 1.SUFFIXES:
2all: _firejail 2MAKEFLAGS += -r
3 3
4ROOT = ../.. 4ROOT = ../..
5-include $(ROOT)/config.mk 5-include $(ROOT)/config.mk
6 6
7.PHONY: all
8all: _firejail
9
7_firejail: _firejail.in $(ROOT)/config.mk 10_firejail: _firejail.in $(ROOT)/config.mk
8 gawk -f ../man/preproc.awk -- $(MANFLAGS) < $< > $@.tmp 11 gawk -f ../man/preproc.awk -- $(MANFLAGS) < $< > $@.tmp
9 sed "s|_SYSCONFDIR_|$(sysconfdir)|" < $@.tmp > $@ 12 sed "s|_SYSCONFDIR_|$(sysconfdir)|" < $@.tmp > $@