Merge pull request #31210 from poettering/chdir-hardening

WorkingDirectory= hardening
This commit is contained in:
Luca Boccassi
2024-02-06 12:41:43 +00:00
committed by GitHub
10 changed files with 146 additions and 57 deletions
+7
View File
@@ -784,3 +784,10 @@ int mount_option_supported(const char *fstype, const char *key, const char *valu
return true; /* works! */
}
bool path_below_api_vfs(const char *p) {
assert(p);
/* API VFS are either directly mounted on any of these three paths, or below it. */
return PATH_STARTSWITH_SET(p, "/dev", "/sys", "/proc");
}