Merge pull request #11820 from dm0-/chase

Allow tmpfiles to create files in a root under an unprivileged directory
This commit is contained in:
Lennart Poettering
2019-03-04 13:04:45 +01:00
committed by GitHub
4 changed files with 60 additions and 3 deletions
+1
View File
@@ -926,6 +926,7 @@ int chase_symlinks(const char *path, const char *original_root, unsigned flags,
if (fstat(child, &st) < 0)
return -errno;
if ((flags & CHASE_SAFE) &&
(empty_or_root(root) || (size_t)(todo - buffer) > strlen(root)) &&
unsafe_transition(&previous_stat, &st))
return log_unsafe_transition(fd, child, path, flags);