aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-05-18 13:22:15 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2016-05-18 13:22:15 -0400
commit2a57a24561e3382059e199cac8aa8bba1bab44a0 (patch)
treeaf9f0d1afc3ef4551b0bec97983607af6fd267e2
parent0.9.40 testing (diff)
downloadfirejail-2a57a24561e3382059e199cac8aa8bba1bab44a0.tar.gz
firejail-2a57a24561e3382059e199cac8aa8bba1bab44a0.tar.zst
firejail-2a57a24561e3382059e199cac8aa8bba1bab44a0.zip
--read-only fix
-rw-r--r--src/firejail/util.c2
-rw-r--r--src/man/firejail.txt16
2 files changed, 10 insertions, 8 deletions
diff --git a/src/firejail/util.c b/src/firejail/util.c
index da73bbfd5..3d5fc214d 100644
--- a/src/firejail/util.c
+++ b/src/firejail/util.c
@@ -548,7 +548,7 @@ char *expand_home(const char *path, const char* homedir) {
548 errExit("asprintf"); 548 errExit("asprintf");
549 return new_name; 549 return new_name;
550 } 550 }
551 else if (strncmp(path, "~/", 2) == 0) { 551 else if (*path == '~') {
552 if (asprintf(&new_name, "%s%s", homedir, path + 1) == -1) 552 if (asprintf(&new_name, "%s%s", homedir, path + 1) == -1)
553 errExit("asprintf"); 553 errExit("asprintf");
554 return new_name; 554 return new_name;
diff --git a/src/man/firejail.txt b/src/man/firejail.txt
index 29a84f71e..e3a660286 100644
--- a/src/man/firejail.txt
+++ b/src/man/firejail.txt
@@ -153,14 +153,7 @@ Example:
153.br 153.br
154$ sudo firejail \-\-caps.keep=chown,net_bind_service,setgid,\\ 154$ sudo firejail \-\-caps.keep=chown,net_bind_service,setgid,\\
155setuid /etc/init.d/nginx start 155setuid /etc/init.d/nginx start
156.br
157 156
158.br
159A short note about mixing \-\-whitelist and \-\-read-only options. Whitelisted directories
160should be made read-only independently. Making a parent directory read-only, will not
161make the whitelist read-only. Example:
162.br
163$ firejail --whitelist=~/work --read-only=~/ --read-only=~/work
164.TP 157.TP
165\fB\-\-caps.print=name|pid 158\fB\-\-caps.print=name|pid
166Print the caps filter for the sandbox identified by name or by PID. 159Print the caps filter for the sandbox identified by name or by PID.
@@ -1138,6 +1131,15 @@ Set directory or file read-only.
1138Example: 1131Example:
1139.br 1132.br
1140$ firejail \-\-read-only=~/.mozilla firefox 1133$ firejail \-\-read-only=~/.mozilla firefox
1134.br
1135
1136.br
1137A short note about mixing \-\-whitelist and \-\-read-only options. Whitelisted directories
1138should be made read-only independently. Making a parent directory read-only, will not
1139make the whitelist read-only. Example:
1140.br
1141$ firejail --whitelist=~/work --read-only=~/ --read-only=~/work
1142
1141.TP 1143.TP
1142\fB\-\-rlimit-fsize=number 1144\fB\-\-rlimit-fsize=number
1143Set the maximum file size that can be created by a process. 1145Set the maximum file size that can be created by a process.