Skip to content

Commit

Permalink
mkdir/mkfile man pages
Browse files Browse the repository at this point in the history
  • Loading branch information
netblue30 committed Feb 26, 2021
1 parent 5d88ee8 commit 9bb1779
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
1 change: 1 addition & 0 deletions RELNOTES
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
firejail (0.9.65) baseline; urgency=low
* filtering environment variables
* zsh completion
* --mkdir, --mkfile
* new profiles: vmware-view, display-im6.q16, ipcalc, ipcalc-ng
* ebook-convert, ebook-edit, ebook-meta, ebook-polish, lzop
* gget
Expand Down
4 changes: 2 additions & 2 deletions src/firejail/usage.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ static char *usage_str =
" --machine-id - preserve /etc/machine-id\n"
" --memory-deny-write-execute - seccomp filter to block attempts to create\n"
"\tmemory mappings that are both writable and executable.\n"
" --mkdir=dirname - create a directory.\n"
" --mkfile=filename - create a file.\n"
#ifdef HAVE_NETWORK
" --mtu=number - set interface MTU.\n"
#endif
Expand Down Expand Up @@ -246,8 +248,6 @@ static char *usage_str =
#ifdef HAVE_WHITELIST
" --whitelist=filename - whitelist directory or file.\n"
#endif
" --mkdir=dirname - create a directory.\n"
" --mkfile=filename - create a file.\n"
" --writable-etc - /etc directory is mounted read-write.\n"
" --writable-run-user - allow access to /run/user/$UID/systemd and\n"
"\t/run/user/$UID/gnupg.\n"
Expand Down
2 changes: 2 additions & 0 deletions src/firejail/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,8 @@ void touch_file_as_user(const char *fname, mode_t mode) {
SET_PERMS_STREAM(fp, -1, -1, mode);
fclose(fp);
}
else
fwarning("cannot create %s\n", fname);
#ifdef HAVE_GCOV
__gcov_flush();
#endif
Expand Down
20 changes: 20 additions & 0 deletions src/man/firejail.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1104,6 +1104,26 @@ Example:
.br
$ firejail \-\-machine-id

.TP
\fB\-\-mkdir=dirname
Create a directory in user home. Parent directories are created as needed.
.br

.br
Example:
.br
$ firejail --mkdir=~/work/project

.TP
\fB\-\-mkfile=filename
Create an empty file in user home.
.br

.br
Example:
.br
$ firejail --mkfile=~/work/project/readme

.TP
\fB\-\-memory-deny-write-execute
Install a seccomp filter to block attempts to create memory mappings
Expand Down

0 comments on commit 9bb1779

Please sign in to comment.