diff options
author | smitsohu <smitsohu@gmail.com> | 2019-07-12 11:39:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-12 11:39:47 +0200 |
commit | de80850e935ec00e59268f6e20969bcae19578b3 (patch) | |
tree | 7661c823ea0d697af7139cf3ba2f400d3a4c50dc /src | |
parent | private-home: remove redundancy (diff) | |
download | firejail-de80850e935ec00e59268f6e20969bcae19578b3.tar.gz firejail-de80850e935ec00e59268f6e20969bcae19578b3.tar.zst firejail-de80850e935ec00e59268f6e20969bcae19578b3.zip |
uniformly mask /home in all private home options
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/fs_home.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/firejail/fs_home.c b/src/firejail/fs_home.c index 75c4b7da3..86e6b0949 100644 --- a/src/firejail/fs_home.c +++ b/src/firejail/fs_home.c | |||
@@ -291,7 +291,7 @@ void fs_private_homedir(void) { | |||
291 | errExit("mounting home directory"); | 291 | errExit("mounting home directory"); |
292 | fs_logger("tmpfs /root"); | 292 | fs_logger("tmpfs /root"); |
293 | } | 293 | } |
294 | else { | 294 | if (u == 0 || strncmp(homedir, "/home/", 6) != 0) { |
295 | // mask /home | 295 | // mask /home |
296 | if (arg_debug) | 296 | if (arg_debug) |
297 | printf("Mounting a new /home directory\n"); | 297 | printf("Mounting a new /home directory\n"); |
@@ -567,7 +567,7 @@ void fs_private_home_list(void) { | |||
567 | if (mount("tmpfs", "/root", "tmpfs", MS_NOSUID | MS_NODEV | MS_STRICTATIME, "mode=700,gid=0") < 0) | 567 | if (mount("tmpfs", "/root", "tmpfs", MS_NOSUID | MS_NODEV | MS_STRICTATIME, "mode=700,gid=0") < 0) |
568 | errExit("mounting home directory"); | 568 | errExit("mounting home directory"); |
569 | } | 569 | } |
570 | else { | 570 | if (uid == 0 || strncmp(homedir, "/home/", 6) != 0) { |
571 | // mask /home | 571 | // mask /home |
572 | if (arg_debug) | 572 | if (arg_debug) |
573 | printf("Mounting a new /home directory\n"); | 573 | printf("Mounting a new /home directory\n"); |