diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/fs_whitelist.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/firejail/fs_whitelist.c b/src/firejail/fs_whitelist.c index 481a63ac2..c515b59f5 100644 --- a/src/firejail/fs_whitelist.c +++ b/src/firejail/fs_whitelist.c | |||
@@ -341,7 +341,7 @@ static void tmpfs_topdirs(const TopDir *topdirs) { | |||
341 | char *pamtmpdir1; | 341 | char *pamtmpdir1; |
342 | if (asprintf(&pamtmpdir1, "/tmp/user/%u", getuid()) == -1) | 342 | if (asprintf(&pamtmpdir1, "/tmp/user/%u", getuid()) == -1) |
343 | errExit("asprintf"); | 343 | errExit("asprintf"); |
344 | char *pamtmpdir2; // see #4151 | 344 | char *pamtmpdir2; |
345 | if (asprintf(&pamtmpdir2, "/tmp/%u", getuid()) == -1) | 345 | if (asprintf(&pamtmpdir2, "/tmp/%u", getuid()) == -1) |
346 | errExit("asprintf"); | 346 | errExit("asprintf"); |
347 | if (strcmp(env, pamtmpdir1) == 0) { | 347 | if (strcmp(env, pamtmpdir1) == 0) { |
@@ -356,7 +356,7 @@ static void tmpfs_topdirs(const TopDir *topdirs) { | |||
356 | EUID_USER(); | 356 | EUID_USER(); |
357 | } | 357 | } |
358 | else if (strcmp(env, pamtmpdir2) == 0) { | 358 | else if (strcmp(env, pamtmpdir2) == 0) { |
359 | // create empty user-owned /tmp/user/$UID directory | 359 | // create empty user-owned /tmp/$UID directory |
360 | EUID_ROOT(); | 360 | EUID_ROOT(); |
361 | mkdir_attr(pamtmpdir2, 0700, getuid(), 0); | 361 | mkdir_attr(pamtmpdir2, 0700, getuid(), 0); |
362 | selinux_relabel_path(pamtmpdir2, pamtmpdir2); | 362 | selinux_relabel_path(pamtmpdir2, pamtmpdir2); |