summaryrefslogtreecommitdiff
path: root/src/test/test-ns.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-08-24 23:17:42 +0200
committerDjalal Harouni <tixxdz@opendz.org>2016-09-25 10:18:51 +0200
commitfe3c2583bee339b6744872dc1897e6486d5bd7e0 (patch)
tree95da59c910b9cf760c3969d835727e19c97f5102 /src/test/test-ns.c
parent59eeb84ba65483c5543d1bc840c2ac75642ef638 (diff)
downloadsystemd-fe3c2583bee339b6744872dc1897e6486d5bd7e0.tar.gz
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.
Diffstat (limited to 'src/test/test-ns.c')
-rw-r--r--src/test/test-ns.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/test/test-ns.c b/src/test/test-ns.c
index 05f243c75c..03a24620af 100644
--- a/src/test/test-ns.c
+++ b/src/test/test-ns.c
@@ -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));