aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml2
-rw-r--r--src/utils.c13
2 files changed, 14 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml
index 661a1a8..a9566e0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -21,4 +21,4 @@ script:
- ./autogen.sh
- CFLAGS="-DCAP_AUDIT_READ=0 -DCAP_AUDIT_WRITE=0" ./configure
- make V=s
- - TERM=linux valgrind --error-exitcode=1 ./src/potd --test --redirect 127.0.0.1:2222:127.0.0.1:22222 --protocol 127.0.0.1:22222:127.0.0.1:33333 --jail 127.0.0.1:33333 --rofile /tmp/potd-rofile --rodir /tmp/potd-rodir
+ - TERM=linux valgrind --error-exitcode=1 ./src/potd --test --redirect 127.0.0.1:2222:127.0.0.1:22222 --protocol 127.0.0.1:22222:127.0.0.1:33333 --jail 127.0.0.1:33333 --rofile /tmp/potd-rofile --rodir /tmp/potd-rodir --root / --netns-rundir /tmp/potd-netns --ssh-rundir /tmp/potd-ssh
diff --git a/src/utils.c b/src/utils.c
index 7933938..bbb05ba 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -1067,6 +1067,19 @@ int selftest_minimal_requirements(void)
E_STRERR("RO-directory '%s' check", getopt_str(OPT_RODIR));
goto error;
}
+ if (mkdir(getopt_str(OPT_ROOT), S_IRWXU) && errno != EEXIST) {
+ E_STRERR("ROOT-directory '%s' check", getopt_str(OPT_ROOT));
+ goto error;
+ }
+ if (mkdir(getopt_str(OPT_NETNS_RUN_DIR), S_IRWXU) && errno != EEXIST) {
+ E_STRERR("NETNS-directory '%s' check", getopt_str(OPT_NETNS_RUN_DIR));
+ goto error;
+ }
+
+ if (mkdir(getopt_str(OPT_SSH_RUN_DIR), S_IRWXU) && errno != EEXIST) {
+ E_STRERR("SSH-directory '%s' check", getopt_str(OPT_SSH_RUN_DIR));
+ goto error;
+ }
if (getopt_used(OPT_RUNTEST)) {
N("%s", "Selftest success");