aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2015-08-10 12:33:28 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2015-08-10 12:33:28 -0400
commit878cd16973307ff164289c8c6762efbb23b519a6 (patch)
tree19938aedf9bcf7798e93007eb5c4a5f28693ea0f /src
parentdescription (diff)
downloadfirejail-878cd16973307ff164289c8c6762efbb23b519a6.tar.gz
firejail-878cd16973307ff164289c8c6762efbb23b519a6.tar.zst
firejail-878cd16973307ff164289c8c6762efbb23b519a6.zip
fixing issues 2 and 4
Diffstat (limited to 'src')
-rw-r--r--src/firejail/profile.c11
-rw-r--r--src/man/firejail-login.txt2
-rw-r--r--src/man/firejail-profile.txt24
-rw-r--r--src/man/firejail.txt2
-rw-r--r--src/man/firemon.txt2
5 files changed, 32 insertions, 9 deletions
diff --git a/src/firejail/profile.c b/src/firejail/profile.c
index 343907584..877428637 100644
--- a/src/firejail/profile.c
+++ b/src/firejail/profile.c
@@ -415,9 +415,18 @@ void profile_read(const char *fname, const char *skip1, const char *skip2) {
415 p++; 415 p++;
416 } 416 }
417 417
418 // expand ${HOME}/ in front of the new profile file
419 char *newprofile2 = NULL;
420 if (strncmp(newprofile, "${HOME}", 7) == 0) {
421 if (asprintf(&newprofile2, "%s%s", cfg.homedir, newprofile + 7) == -1)
422 errExit("asprintf");
423 }
424
418 // recursivity 425 // recursivity
419 profile_read(newprofile, newskip1, newskip2); 426 profile_read((newprofile2)? newprofile2:newprofile, newskip1, newskip2);
420 include_level--; 427 include_level--;
428 if (newprofile2)
429 free(newprofile2);
421 free(ptr); 430 free(ptr);
422 continue; 431 continue;
423 } 432 }
diff --git a/src/man/firejail-login.txt b/src/man/firejail-login.txt
index 6613dc044..768896872 100644
--- a/src/man/firejail-login.txt
+++ b/src/man/firejail-login.txt
@@ -1,4 +1,4 @@
1.TH man 5 "MONTH YEAR" "VERSION" "firejail login.users man page" 1.TH FIREJAIL-LOGIN 5 "MONTH YEAR" "VERSION" "firejail login.users man page"
2.SH NAME 2.SH NAME
3login.users \- Login file syntax for Firejail 3login.users \- Login file syntax for Firejail
4 4
diff --git a/src/man/firejail-profile.txt b/src/man/firejail-profile.txt
index 46da19ecd..f85e10171 100644
--- a/src/man/firejail-profile.txt
+++ b/src/man/firejail-profile.txt
@@ -1,4 +1,4 @@
1.TH man 5 "MONTH YEAR" "VERSION" "firejail profiles man page" 1.TH FIREJAIL-PROFILE 5 "MONTH YEAR" "VERSION" "firejail profiles man page"
2.SH NAME 2.SH NAME
3profile \- Profile file syntax for Firejail 3profile \- Profile file syntax for Firejail
4 4
@@ -15,8 +15,19 @@ directory and ~/.config/firejail directory.
15Include and comment support: 15Include and comment support:
16 16
17.TP 17.TP
18\f\include other.profile 18\f\include other.profile exclude-token
19Include other.profile file. 19Include other.profile file. exclued-token disables blacklist commands in other.profile
20if exclude-token word is found in the name section of blacklist command.
21exclude-tyoken is optional.
22
23Example: "include /etc/firejail/disable-common.inc .filezilla"
24loads disable-common.inc file disables "blacklist ${HOME}/.filezilla" command in this file.
25
26other.profile file name can be prefixed with ${HOME}. This will force Firejail to look for the
27file in user home directory.
28
29Example: "include ${HOME}/myprofiles/profile1" will load "~/myprofiles/profile1" file.
30
20.TP 31.TP
21# this is a comment 32# this is a comment
22 33
@@ -81,14 +92,17 @@ Enable default Linux capabilities filter.
81caps.drop all 92caps.drop all
82Blacklist all Linux capabilities. 93Blacklist all Linux capabilities.
83.TP 94.TP
84caps.drop capability,capability,capability 95caps.keep capability,capability,capability
85Blacklist Linux capabilities filter. 96Blacklist Linux capabilities filter.
86.TP 97.TP
87caps.drop capability,capability,capability 98caps.drop capability,capability,capability
88Whitelist Linux capabilities filter. 99Whitelist Linux capabilities filter.
89.TP 100.TP
90\f\seccomp 101\f\seccomp
91Enable default seccomp filter. 102Enable default seccomp filter. The default list is as follows:
103mount, umount2, ptrace, kexec_load, open_by_handle_at, init_module, finit_module, delete_module,
104iopl, ioperm, swapon, swapoff, mknode, syslog, process_vm_readv and process_vm_writev,
105sysfs,_sysctl, adjtimex, clock_adjtime, lookup_dcookie, perf_event_open, fanotify_init and kcmp.
92.TP 106.TP
93\f\seccomp syscall,syscall,syscall 107\f\seccomp syscall,syscall,syscall
94Enable seccomp filter and blacklist the system calls in the list on top of default seccomp filter. 108Enable seccomp filter and blacklist the system calls in the list on top of default seccomp filter.
diff --git a/src/man/firejail.txt b/src/man/firejail.txt
index 51f21975e..4e8d96d31 100644
--- a/src/man/firejail.txt
+++ b/src/man/firejail.txt
@@ -1,4 +1,4 @@
1.TH man 1 "MONTH YEAR" "VERSION" "firejail man page" 1.TH FIREJAIL 1 "MONTH YEAR" "VERSION" "firejail man page"
2.SH NAME 2.SH NAME
3Firejail \- Linux namespaces sandbox program 3Firejail \- Linux namespaces sandbox program
4.SH SYNOPSIS 4.SH SYNOPSIS
diff --git a/src/man/firemon.txt b/src/man/firemon.txt
index b6010f46e..293547a3b 100644
--- a/src/man/firemon.txt
+++ b/src/man/firemon.txt
@@ -1,4 +1,4 @@
1.TH man 1 "MONTH YEAR" "VERSION" "firemon man page" 1.TH FIREMON 1 "MONTH YEAR" "VERSION" "firemon man page"
2.SH NAME 2.SH NAME
3Firemon \- Monitoring program for processes started in a Firejail sandbox. 3Firemon \- Monitoring program for processes started in a Firejail sandbox.
4.SH SYNOPSIS 4.SH SYNOPSIS