diff options
Diffstat (limited to 'src/firejail/preproc.c')
-rw-r--r-- | src/firejail/preproc.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/firejail/preproc.c b/src/firejail/preproc.c index b834e6275..ef93368bf 100644 --- a/src/firejail/preproc.c +++ b/src/firejail/preproc.c | |||
@@ -35,27 +35,27 @@ void preproc_build_firejail_dir(void) { | |||
35 | if (stat(RUN_FIREJAIL_DIR, &s)) { | 35 | if (stat(RUN_FIREJAIL_DIR, &s)) { |
36 | create_empty_dir_as_root(RUN_FIREJAIL_DIR, 0755); | 36 | create_empty_dir_as_root(RUN_FIREJAIL_DIR, 0755); |
37 | } | 37 | } |
38 | 38 | ||
39 | if (stat(RUN_FIREJAIL_NETWORK_DIR, &s)) { | 39 | if (stat(RUN_FIREJAIL_NETWORK_DIR, &s)) { |
40 | create_empty_dir_as_root(RUN_FIREJAIL_NETWORK_DIR, 0755); | 40 | create_empty_dir_as_root(RUN_FIREJAIL_NETWORK_DIR, 0755); |
41 | } | 41 | } |
42 | 42 | ||
43 | if (stat(RUN_FIREJAIL_BANDWIDTH_DIR, &s)) { | 43 | if (stat(RUN_FIREJAIL_BANDWIDTH_DIR, &s)) { |
44 | create_empty_dir_as_root(RUN_FIREJAIL_BANDWIDTH_DIR, 0755); | 44 | create_empty_dir_as_root(RUN_FIREJAIL_BANDWIDTH_DIR, 0755); |
45 | } | 45 | } |
46 | 46 | ||
47 | if (stat(RUN_FIREJAIL_NAME_DIR, &s)) { | 47 | if (stat(RUN_FIREJAIL_NAME_DIR, &s)) { |
48 | create_empty_dir_as_root(RUN_FIREJAIL_NAME_DIR, 0755); | 48 | create_empty_dir_as_root(RUN_FIREJAIL_NAME_DIR, 0755); |
49 | } | 49 | } |
50 | 50 | ||
51 | if (stat(RUN_FIREJAIL_X11_DIR, &s)) { | 51 | if (stat(RUN_FIREJAIL_X11_DIR, &s)) { |
52 | create_empty_dir_as_root(RUN_FIREJAIL_X11_DIR, 0755); | 52 | create_empty_dir_as_root(RUN_FIREJAIL_X11_DIR, 0755); |
53 | } | 53 | } |
54 | 54 | ||
55 | if (stat(RUN_FIREJAIL_APPIMAGE_DIR, &s)) { | 55 | if (stat(RUN_FIREJAIL_APPIMAGE_DIR, &s)) { |
56 | create_empty_dir_as_root(RUN_FIREJAIL_APPIMAGE_DIR, 0755); | 56 | create_empty_dir_as_root(RUN_FIREJAIL_APPIMAGE_DIR, 0755); |
57 | } | 57 | } |
58 | 58 | ||
59 | if (stat(RUN_MNT_DIR, &s)) { | 59 | if (stat(RUN_MNT_DIR, &s)) { |
60 | create_empty_dir_as_root(RUN_MNT_DIR, 0755); | 60 | create_empty_dir_as_root(RUN_MNT_DIR, 0755); |
61 | } | 61 | } |
@@ -74,7 +74,7 @@ void preproc_mount_mnt_dir(void) { | |||
74 | errExit("mounting /run/firejail/mnt"); | 74 | errExit("mounting /run/firejail/mnt"); |
75 | tmpfs_mounted = 1; | 75 | tmpfs_mounted = 1; |
76 | fs_logger2("tmpfs", RUN_MNT_DIR); | 76 | fs_logger2("tmpfs", RUN_MNT_DIR); |
77 | 77 | ||
78 | //copy defaultl seccomp files | 78 | //copy defaultl seccomp files |
79 | copy_file(PATH_SECCOMP_I386, RUN_SECCOMP_I386, getuid(), getgid(), 0644); // root needed | 79 | copy_file(PATH_SECCOMP_I386, RUN_SECCOMP_I386, getuid(), getgid(), 0644); // root needed |
80 | copy_file(PATH_SECCOMP_AMD64, RUN_SECCOMP_AMD64, getuid(), getgid(), 0644); // root needed | 80 | copy_file(PATH_SECCOMP_AMD64, RUN_SECCOMP_AMD64, getuid(), getgid(), 0644); // root needed |
@@ -82,7 +82,7 @@ void preproc_mount_mnt_dir(void) { | |||
82 | copy_file(PATH_SECCOMP_DEFAULT_DEBUG, RUN_SECCOMP_CFG, getuid(), getgid(), 0644); // root needed | 82 | copy_file(PATH_SECCOMP_DEFAULT_DEBUG, RUN_SECCOMP_CFG, getuid(), getgid(), 0644); // root needed |
83 | else | 83 | else |
84 | copy_file(PATH_SECCOMP_DEFAULT, RUN_SECCOMP_CFG, getuid(), getgid(), 0644); // root needed | 84 | copy_file(PATH_SECCOMP_DEFAULT, RUN_SECCOMP_CFG, getuid(), getgid(), 0644); // root needed |
85 | 85 | ||
86 | // as root, create an empty RUN_SECCOMP_PROTOCOL file | 86 | // as root, create an empty RUN_SECCOMP_PROTOCOL file |
87 | create_empty_file_as_root(RUN_SECCOMP_PROTOCOL, 0644); | 87 | create_empty_file_as_root(RUN_SECCOMP_PROTOCOL, 0644); |
88 | if (set_perms(RUN_SECCOMP_PROTOCOL, getuid(), getgid(), 0644)) | 88 | if (set_perms(RUN_SECCOMP_PROTOCOL, getuid(), getgid(), 0644)) |