diff options
-rw-r--r-- | .gitlab-ci.yml | 10 | ||||
-rw-r--r-- | .travis.yml | 7 | ||||
-rw-r--r-- | src/utils.c | 7 |
3 files changed, 6 insertions, 18 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c570823..248ada9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,17 +6,15 @@ stages: build-debian: image: debian:stable script: - - apt-get update -qq && apt-get install -y -qq coreutils make autoconf automake gcc pkg-config libseccomp-dev libssh-dev valgrind + - apt-get update -qq && apt-get install -y -qq coreutils make autoconf automake gcc pkg-config libseccomp-dev libssh-dev - ./autogen.sh - CFLAGS="-DHAVE_SECCOMP=1" ./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 - cp ./src/potd ./src/potd-full - cp ./config.log ./config-full.log - apt-get purge -y -qq libseccomp2 libseccomp-dev - ./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 stage: build artifacts: paths: @@ -28,17 +26,15 @@ build-debian: build-arch: image: base/archlinux script: - - pacman -Syu --noconfirm coreutils make autoconf automake gcc pkg-config libseccomp libssh valgrind + - pacman -Syu --noconfirm coreutils make autoconf automake gcc pkg-config libseccomp libssh - ./autogen.sh - CFLAGS="-DHAVE_SECCOMP=1" ./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 - cp ./src/potd ./src/potd-full - cp ./config.log ./config-full.log - pacman -Rsn --noconfirm libseccomp - ./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:33332 stage: test artifacts: paths: @@ -66,4 +62,4 @@ cppcheck: stage: analysis script: - pacman -Syu --noconfirm cppcheck - - cppcheck --force --enable=warning,unusedFunction,performance,portability --inconclusive --std=posix -DNDEBUG=1 -DHAVE_STRTOK_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_GETPWNAM_R=1 -DHAVE_GETGRNAM_R=1 . + - cppcheck --force --enable=warning,unusedFunction,performance,portability --inconclusive --std=posix -DNDEBUG=1 -DHAVE_STRTOK_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_GETPWNAM_R=1 -DHAVE_GETGRNAM_R=1 ./src diff --git a/.travis.yml b/.travis.yml index 6f43ffe..924ab46 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ compiler: - gcc before_install: - sudo apt-get -qq update -- sudo apt-get install -y -qq coreutils make autoconf automake gcc pkg-config valgrind cppcheck +- sudo apt-get install -y -qq coreutils make autoconf automake gcc pkg-config cppcheck wget libssl-dev - wget 'https://www.libssh.org/files/0.7/libssh-0.7.5.tar.xz' -O ./libssh-0.7.5.tar.xz - tar -xvf ./libssh-0.7.5.tar.xz @@ -18,10 +18,7 @@ script: - ./autogen.sh - ./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 --root / --netns-rundir /tmp/potd-netns --ssh-rundir /tmp/potd-ssh -- cppcheck --force --enable=warning,unusedFunction,performance,portability --inconclusive --std=posix -DNDEBUG=1 -DHAVE_STRTOK_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_GETPWNAM_R=1 -DHAVE_GETGRNAM_R=1 . +- cppcheck --force --enable=warning,unusedFunction,performance,portability --inconclusive --std=posix -DNDEBUG=1 -DHAVE_STRTOK_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_GETPWNAM_R=1 -DHAVE_GETGRNAM_R=1 ./src env: global: secure: ZWiQ1tSucEHu8V1qajVPOi7mpqdQ2horCuRdjJJcU6zT+//HOcApsKS/zexLMwTSgazzYSVZXpakjW7PTWpo6MJWDyDyXKHL6yWpVaYlyieUjbvnidooYIn9kcqVi4yuEk3dGorRFcaVujHkLQyq4WtmrxtKQD7iepFJ5rDUHBTOHeeY+zhv3+gPWCeIMOB//0Df4KYd3rfPICmRMALrRYBXr9xX4UBF5BeIFgGFO6Y+j/Pr9LWrqTpAyShREs0QAn7f8ZUGtG9igNhueaDnjNe6Zi5Pl2XTd0R+YIBl/b6AlLtWbnf8MUoyNzy6wJkI9DThJXGpdItlE9/Jf1mDt3qvmdGfDFWL4HnflSVrmKl7TCfx4etHelU2BArhBp/PzvxYwIhMVv+cqmWv7DVtmWRDN/O9rqe1+g5Dy6I5t05t8ZbcLASDwVS9sa4+jwtLJMxLgySMQ2I2AihvrxYkRdahIYd4V7Ge9Gy8M8xPEkQa0riYb6phD4cx5FQY1oP9zpZMHKsF98aKMqAQOffwrwRe2hrJxxlo2anBSxs7y0fn33PrjX5r3orEMiPJ3mhuwMofxdxrKx9oBBiWmMYC2it3l/rNzHMYDNs/weKro8guTXRWwzRB7oeFJq9sEXbdtN4WoG4dXTYxsE/rHZStIcPgKFPJSwoSq6WIHYlh1wI= diff --git a/src/utils.c b/src/utils.c index 6f6416c..82902e2 100644 --- a/src/utils.c +++ b/src/utils.c @@ -1047,12 +1047,11 @@ int selftest_minimal_requirements(void) int s; char buf[32] = {0}; char test[64] = {0}; -/* + pid_t child_pid; #ifdef HAVE_SECCOMP pseccomp_ctx *psc = NULL; #endif -*/ N2("%s", "Selftest .."); @@ -1102,7 +1101,6 @@ int selftest_minimal_requirements(void) * The following tests do neither work on travis-ci nor on gitlab. * FIXME: fork() broken on some docker containers? */ -/* s = -1; child_pid = fork(); if (!child_pid) { @@ -1113,10 +1111,8 @@ int selftest_minimal_requirements(void) } else waitpid(child_pid, &s, 0); if (s) goto error; -*/ /* advanced sandbox tests */ -/* if (getuid() == (uid_t) 0) { child_pid = fork(); @@ -1172,7 +1168,6 @@ int selftest_minimal_requirements(void) goto error; } } -*/ N("%s", "Selftest success"); if (getopt_used(OPT_RUNTEST)) |