diff options
author | 2017-03-25 12:24:35 -0400 | |
---|---|---|
committer | 2017-03-25 12:24:35 -0400 | |
commit | 137568292056a774d731f9516879ad9b4175b920 (patch) | |
tree | b5809840c31770b1fa1452dac81c9726edf2dd3d | |
parent | reverted back commit 22414ad - TOCTOU condition found by Martin Carpenter (diff) | |
download | firejail-137568292056a774d731f9516879ad9b4175b920.tar.gz firejail-137568292056a774d731f9516879ad9b4175b920.tar.zst firejail-137568292056a774d731f9516879ad9b4175b920.zip |
tentative ~/.cache tmpfs implementation
-rw-r--r-- | src/firejail/fs.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/firejail/fs.c b/src/firejail/fs.c index e1bac33f3..fc6bdc7d0 100644 --- a/src/firejail/fs.c +++ b/src/firejail/fs.c | |||
@@ -481,15 +481,21 @@ void fs_mnt(void) { | |||
481 | 481 | ||
482 | 482 | ||
483 | void fs_cache(void) { | 483 | void fs_cache(void) { |
484 | #if 0 | ||
485 | if (arg_debug) | 484 | if (arg_debug) |
486 | printf("Deploy ~/.cache tmpfs\n"); | 485 | printf("Deploy ~/.cache tmpfs\n"); |
487 | char *cache; | 486 | char *cache; |
488 | if (asprintf(&cache, "%s/.cache", cfg.homedir) == -1) | 487 | if (asprintf(&cache, "%s/.cache", cfg.homedir) == -1) |
489 | errExit("asprintf"); | 488 | errExit("asprintf"); |
489 | if (is_link(cache)) { | ||
490 | fprintf(stderr, "Error: ~/.cache directory is a symbolik link\n"); | ||
491 | exit(1); | ||
492 | } | ||
490 | disable_file(MOUNT_TMPFS, cache); | 493 | disable_file(MOUNT_TMPFS, cache); |
494 | if (is_link(cache)) { | ||
495 | fprintf(stderr, "Error: ~/.cache directory is a symbolik link\n"); | ||
496 | exit(1); | ||
497 | } | ||
491 | free(cache); | 498 | free(cache); |
492 | #endif | ||
493 | } | 499 | } |
494 | 500 | ||
495 | // mount /proc and /sys directories | 501 | // mount /proc and /sys directories |