diff options
author | 2017-11-02 09:12:08 -0400 | |
---|---|---|
committer | 2017-11-02 09:12:08 -0400 | |
commit | 601068247adcb0f947c8098a1533de749accc02e (patch) | |
tree | 3c23f6e032da11a19f3b369365da966237edb4ec /src/firejail/fs_home.c | |
parent | fix --dns issue #1621 (diff) | |
download | firejail-601068247adcb0f947c8098a1533de749accc02e.tar.gz firejail-601068247adcb0f947c8098a1533de749accc02e.tar.zst firejail-601068247adcb0f947c8098a1533de749accc02e.zip |
fixing filesystem reporting for firetools
Diffstat (limited to 'src/firejail/fs_home.c')
-rw-r--r-- | src/firejail/fs_home.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/firejail/fs_home.c b/src/firejail/fs_home.c index 6d3818ccb..5a39fab48 100644 --- a/src/firejail/fs_home.c +++ b/src/firejail/fs_home.c | |||
@@ -50,6 +50,7 @@ static void skel(const char *homedir, uid_t u, gid_t g) { | |||
50 | if (stat("/etc/skel/.zshrc", &s) == 0) { | 50 | if (stat("/etc/skel/.zshrc", &s) == 0) { |
51 | copy_file_as_user("/etc/skel/.zshrc", fname, u, g, 0644); // regular user | 51 | copy_file_as_user("/etc/skel/.zshrc", fname, u, g, 0644); // regular user |
52 | fs_logger("clone /etc/skel/.zshrc"); | 52 | fs_logger("clone /etc/skel/.zshrc"); |
53 | fs_logger2("clone", fname); | ||
53 | } | 54 | } |
54 | else { | 55 | else { |
55 | touch_file_as_user(fname, u, g, 0644); | 56 | touch_file_as_user(fname, u, g, 0644); |
@@ -74,6 +75,7 @@ static void skel(const char *homedir, uid_t u, gid_t g) { | |||
74 | if (stat("/etc/skel/.cshrc", &s) == 0) { | 75 | if (stat("/etc/skel/.cshrc", &s) == 0) { |
75 | copy_file_as_user("/etc/skel/.cshrc", fname, u, g, 0644); // regular user | 76 | copy_file_as_user("/etc/skel/.cshrc", fname, u, g, 0644); // regular user |
76 | fs_logger("clone /etc/skel/.cshrc"); | 77 | fs_logger("clone /etc/skel/.cshrc"); |
78 | fs_logger2("clone", fname); | ||
77 | } | 79 | } |
78 | else { | 80 | else { |
79 | touch_file_as_user(fname, u, g, 0644); | 81 | touch_file_as_user(fname, u, g, 0644); |
@@ -97,6 +99,7 @@ static void skel(const char *homedir, uid_t u, gid_t g) { | |||
97 | if (stat("/etc/skel/.bashrc", &s) == 0) { | 99 | if (stat("/etc/skel/.bashrc", &s) == 0) { |
98 | copy_file_as_user("/etc/skel/.bashrc", fname, u, g, 0644); // regular user | 100 | copy_file_as_user("/etc/skel/.bashrc", fname, u, g, 0644); // regular user |
99 | fs_logger("clone /etc/skel/.bashrc"); | 101 | fs_logger("clone /etc/skel/.bashrc"); |
102 | fs_logger2("clone", fname); | ||
100 | } | 103 | } |
101 | free(fname); | 104 | free(fname); |
102 | } | 105 | } |
@@ -312,6 +315,7 @@ void fs_private(void) { | |||
312 | if (chown(homedir, u, g) < 0) | 315 | if (chown(homedir, u, g) < 0) |
313 | errExit("chown"); | 316 | errExit("chown"); |
314 | fs_logger2("mkdir", homedir); | 317 | fs_logger2("mkdir", homedir); |
318 | fs_logger2("tmpfs", homedir); | ||
315 | } | 319 | } |
316 | 320 | ||
317 | skel(homedir, u, g); | 321 | skel(homedir, u, g); |
@@ -500,6 +504,7 @@ void fs_private_home_list(void) { | |||
500 | 504 | ||
501 | if (mount(RUN_HOME_DIR, homedir, NULL, MS_BIND|MS_REC, NULL) < 0) | 505 | if (mount(RUN_HOME_DIR, homedir, NULL, MS_BIND|MS_REC, NULL) < 0) |
502 | errExit("mount bind"); | 506 | errExit("mount bind"); |
507 | fs_logger2("tmpfs", homedir); | ||
503 | 508 | ||
504 | if (uid != 0) { | 509 | if (uid != 0) { |
505 | // mask /root | 510 | // mask /root |