diff options
Diffstat (limited to 'src/firejail/util.c')
-rw-r--r-- | src/firejail/util.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/firejail/util.c b/src/firejail/util.c index c56380ca1..03f52fabb 100644 --- a/src/firejail/util.c +++ b/src/firejail/util.c | |||
@@ -694,6 +694,7 @@ void flush_stdin(void) { | |||
694 | 694 | ||
695 | void create_empty_dir_as_root(const char *dir, mode_t mode) { | 695 | void create_empty_dir_as_root(const char *dir, mode_t mode) { |
696 | assert(dir); | 696 | assert(dir); |
697 | mode &= 07777; | ||
697 | struct stat s; | 698 | struct stat s; |
698 | 699 | ||
699 | if (stat(dir, &s)) { | 700 | if (stat(dir, &s)) { |
@@ -709,6 +710,7 @@ void create_empty_dir_as_root(const char *dir, mode_t mode) { | |||
709 | 710 | ||
710 | void create_empty_file_as_root(const char *fname, mode_t mode) { | 711 | void create_empty_file_as_root(const char *fname, mode_t mode) { |
711 | assert(fname); | 712 | assert(fname); |
713 | mode &= 07777; | ||
712 | struct stat s; | 714 | struct stat s; |
713 | 715 | ||
714 | if (stat(fname, &s)) { | 716 | if (stat(fname, &s)) { |