From 137568292056a774d731f9516879ad9b4175b920 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Sat, 25 Mar 2017 12:24:35 -0400 Subject: tentative ~/.cache tmpfs implementation --- src/firejail/fs.c | 10 ++++++++-- 1 file 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) { void fs_cache(void) { -#if 0 if (arg_debug) printf("Deploy ~/.cache tmpfs\n"); char *cache; if (asprintf(&cache, "%s/.cache", cfg.homedir) == -1) errExit("asprintf"); + if (is_link(cache)) { + fprintf(stderr, "Error: ~/.cache directory is a symbolik link\n"); + exit(1); + } disable_file(MOUNT_TMPFS, cache); + if (is_link(cache)) { + fprintf(stderr, "Error: ~/.cache directory is a symbolik link\n"); + exit(1); + } free(cache); -#endif } // mount /proc and /sys directories -- cgit v1.2.3-54-g00ecf