diff options
author | startx2017 <vradu.startx@yandex.com> | 2017-11-02 09:12:08 -0400 |
---|---|---|
committer | startx2017 <vradu.startx@yandex.com> | 2017-11-02 09:12:08 -0400 |
commit | 601068247adcb0f947c8098a1533de749accc02e (patch) | |
tree | 3c23f6e032da11a19f3b369365da966237edb4ec /src/firejail/fs_dev.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_dev.c')
-rw-r--r-- | src/firejail/fs_dev.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/firejail/fs_dev.c b/src/firejail/fs_dev.c index 0dbbb65a0..d839a0786 100644 --- a/src/firejail/fs_dev.c +++ b/src/firejail/fs_dev.c | |||
@@ -131,6 +131,7 @@ static void create_char_dev(const char *path, mode_t mode, int major, int minor) | |||
131 | if (chmod(path, mode) < 0) | 131 | if (chmod(path, mode) < 0) |
132 | goto errexit; | 132 | goto errexit; |
133 | ASSERT_PERMS(path, 0, 0, mode); | 133 | ASSERT_PERMS(path, 0, 0, mode); |
134 | fs_logger2("create", path); | ||
134 | 135 | ||
135 | return; | 136 | return; |
136 | 137 | ||
@@ -144,6 +145,7 @@ static void create_link(const char *oldpath, const char *newpath) { | |||
144 | goto errexit; | 145 | goto errexit; |
145 | if (chown(newpath, 0, 0) < 0) | 146 | if (chown(newpath, 0, 0) < 0) |
146 | goto errexit; | 147 | goto errexit; |
148 | fs_logger2("create", newpath); | ||
147 | return; | 149 | return; |
148 | 150 | ||
149 | errexit: | 151 | errexit: |
@@ -205,6 +207,7 @@ void fs_private_dev(void){ | |||
205 | printf("Create /dev/shm directory\n"); | 207 | printf("Create /dev/shm directory\n"); |
206 | mkdir_attr("/dev/shm", 01777, 0, 0); | 208 | mkdir_attr("/dev/shm", 01777, 0, 0); |
207 | fs_logger("mkdir /dev/shm"); | 209 | fs_logger("mkdir /dev/shm"); |
210 | fs_logger("create /dev/shm"); | ||
208 | 211 | ||
209 | // create default devices | 212 | // create default devices |
210 | create_char_dev("/dev/zero", 0666, 1, 5); // mknod -m 666 /dev/zero c 1 5 | 213 | create_char_dev("/dev/zero", 0666, 1, 5); // mknod -m 666 /dev/zero c 1 5 |
@@ -227,6 +230,7 @@ void fs_private_dev(void){ | |||
227 | // pseudo-terminal | 230 | // pseudo-terminal |
228 | mkdir_attr("/dev/pts", 0755, 0, 0); | 231 | mkdir_attr("/dev/pts", 0755, 0, 0); |
229 | fs_logger("mkdir /dev/pts"); | 232 | fs_logger("mkdir /dev/pts"); |
233 | fs_logger("create /dev/pts"); | ||
230 | create_char_dev("/dev/pts/ptmx", 0666, 5, 2); //"mknod -m 666 /dev/pts/ptmx c 5 2"); | 234 | create_char_dev("/dev/pts/ptmx", 0666, 5, 2); //"mknod -m 666 /dev/pts/ptmx c 5 2"); |
231 | fs_logger("mknod /dev/pts/ptmx"); | 235 | fs_logger("mknod /dev/pts/ptmx"); |
232 | create_link("/dev/pts/ptmx", "/dev/ptmx"); | 236 | create_link("/dev/pts/ptmx", "/dev/ptmx"); |