diff options
author | 2022-01-21 08:47:00 -0500 | |
---|---|---|
committer | 2022-01-21 08:47:00 -0500 | |
commit | 0d7a813e4fab9568b9f5cb93e0887fc1553a5a53 (patch) | |
tree | 403e62e0f62ea11072edd560f5b9697fcafcd72d /src | |
parent | fix attribute for /tmp/user in --private-tmp, and fix #4151 (diff) | |
download | firejail-0d7a813e4fab9568b9f5cb93e0887fc1553a5a53.tar.gz firejail-0d7a813e4fab9568b9f5cb93e0887fc1553a5a53.tar.zst firejail-0d7a813e4fab9568b9f5cb93e0887fc1553a5a53.zip |
cleanup for previous commit
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); |