namespace: make sure InaccessibleDirectories= masks all mounts further down

If a dir is marked to be inaccessible then everything below it should be masked
by it.
This commit is contained in:
Lennart Poettering
2016-09-25 10:18:51 +02:00
committed by Djalal Harouni
parent 59eeb84ba6
commit fe3c2583be
2 changed files with 43 additions and 5 deletions
+3 -1
View File
@@ -26,6 +26,7 @@
int main(int argc, char *argv[]) {
const char * const writable[] = {
"/home",
"/home/lennart/projects/foobar", /* this should be masked automatically */
NULL
};
@@ -42,11 +43,12 @@ int main(int argc, char *argv[]) {
};
char *root_directory;
char *projects_directory;
int r;
char tmp_dir[] = "/tmp/systemd-private-XXXXXX",
var_tmp_dir[] = "/var/tmp/systemd-private-XXXXXX";
log_set_max_level(LOG_DEBUG);
assert_se(mkdtemp(tmp_dir));
assert_se(mkdtemp(var_tmp_dir));