Commit 8afa426d authored by Andrei Vagin's avatar Andrei Vagin Committed by Pavel Emelyanov

alpine: call write instead of fprintf

fprintf in Alpine Linux calls writev, which is prohibited in the
SECCOMP_MODE_STRICT mode.

===================== Run zdtm/static/seccomp_strict in h ======================
Start test
Test is SUID
./seccomp_strict --pidfile=seccomp_strict.pid --outfile=seccomp_strict.out
make: *** [Makefile:385: seccomp_strict.pid] Error 1
 Test zdtm/static/seccomp_strict FAIL at start: [Errno 2] No such file or directory: 'zdtm/static/seccomp_strict.pid'
Test output: ================================
22:45:24.661:    38: ERR: seccomp_strict.c:97: read (errno = 2 (No such file or directory))
22:45:24.662:    37: ERR: test.c:315: Test exited unexpectedly with code 1
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 0e05bdfe
...@@ -64,6 +64,6 @@ skip: ...@@ -64,6 +64,6 @@ skip:
off += vsnprintf(buf + off, sizeof(buf) - off, format, arg); off += vsnprintf(buf + off, sizeof(buf) - off, format, arg);
va_end(arg); va_end(arg);
fprintf(stderr, "%s", buf); write(2, buf, off);
errno = __errno; errno = __errno;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment