Skip to content

Commit

Permalink
whitelist, private-dev, private-tmp support for chroot and overlay sa…
Browse files Browse the repository at this point in the history
…ndboxes
  • Loading branch information
netblue30 committed Jan 25, 2018
1 parent d1f0334 commit 092898d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 24 deletions.
4 changes: 4 additions & 0 deletions RELNOTES
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
firejail (0.9.53) baseline; urgency=low
* work in progress
* seccomp syscall list update for glibc 2.26-10
* IPv6 DNS support
* whitelist support for overlay and chroot sandboxes
* private-dev support for overlay and chroot sandboxes
* private-tmp support for overlay and chroot sandboxes
* new profiles: basilisk, Tor Browser language packs, PlayOnLinux, sylpheed, discord-canary
* new profiles: pycharm-community, pycharm-professional
-- netblue30 <[email protected]> Tue, 12 Dec 2017 08:00:00 -0500
Expand Down
31 changes: 7 additions & 24 deletions src/firejail/sandbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -763,14 +763,8 @@ int sandbox(void* sandbox_arg) {
fs_private();
}

if (arg_private_dev) {
if (cfg.chrootdir)
fwarning("private-dev feature is disabled in chroot\n");
else if (arg_overlay)
fwarning("private-dev feature is disabled in overlay\n");
else
fs_private_dev();
}
if (arg_private_dev)
fs_private_dev();

if (arg_private_etc) {
if (cfg.chrootdir)
Expand Down Expand Up @@ -835,16 +829,10 @@ int sandbox(void* sandbox_arg) {
}

if (arg_private_tmp) {
if (cfg.chrootdir)
fwarning("private-tmp feature is disabled in chroot\n");
else if (arg_overlay)
fwarning("private-tmp feature is disabled in overlay\n");
else {
// private-tmp is implemented as a whitelist
EUID_USER();
fs_private_tmp();
EUID_ROOT();
}
// private-tmp is implemented as a whitelist
EUID_USER();
fs_private_tmp();
EUID_ROOT();
}

//****************************
Expand Down Expand Up @@ -877,12 +865,7 @@ int sandbox(void* sandbox_arg) {
// apply the profile file
//****************************
// apply all whitelist commands ...
if (cfg.chrootdir)
fwarning("whitelist feature is disabled in chroot\n");
else if (arg_overlay)
fwarning("whitelist feature is disabled in overlay\n");
else
fs_whitelist();
fs_whitelist();

// ... followed by blacklist commands
fs_blacklist(); // mkdir and mkfile are processed all over again
Expand Down

0 comments on commit 092898d

Please sign in to comment.