diff options
Diffstat (limited to 'src/firejail/fs_home.c')
-rw-r--r-- | src/firejail/fs_home.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/firejail/fs_home.c b/src/firejail/fs_home.c index d24f19da7..70f0388e6 100644 --- a/src/firejail/fs_home.c +++ b/src/firejail/fs_home.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <glob.h> | 23 | #include <glob.h> |
24 | #include <dirent.h> | 24 | #include <dirent.h> |
25 | #include <fcntl.h> | 25 | #include <fcntl.h> |
26 | #include <errno.h> | ||
26 | #include <sys/stat.h> | 27 | #include <sys/stat.h> |
27 | #include <sys/types.h> | 28 | #include <sys/types.h> |
28 | #include <sys/wait.h> | 29 | #include <sys/wait.h> |
@@ -301,7 +302,7 @@ void fs_private(void) { | |||
301 | if (mkdir(homedir, S_IRWXU) == -1) { | 302 | if (mkdir(homedir, S_IRWXU) == -1) { |
302 | if (mkpath_as_root(homedir) == -1) | 303 | if (mkpath_as_root(homedir) == -1) |
303 | errExit("mkpath"); | 304 | errExit("mkpath"); |
304 | if (mkdir(homedir, S_IRWXU) == -1) | 305 | if (mkdir(homedir, S_IRWXU) == -1 && errno != EEXIST) |
305 | errExit("mkdir"); | 306 | errExit("mkdir"); |
306 | } | 307 | } |
307 | if (chown(homedir, u, g) < 0) | 308 | if (chown(homedir, u, g) < 0) |