make -C kafel
make[1]: Entering directory '/build/nsjail/src/nsjail-2.7/kafel'
Makefile:27: warning: overriding recipe for target 'test'
build/Makefile.mk:41: warning: ignoring old recipe for target 'test'
make -C src PROJECT_ROOT=../
make[2]: Entering directory '/build/nsjail/src/nsjail-2.7/kafel/src'
bison parser.y
flex lexer.l
cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -std=gnu11 -Iinclude -Wall -Wextra -Werror -O2 -fPIC -fvisibility=hidden -std=gnu11 -I../include -Wall -Wextra -Werror -O2 -D_FORTIFY_SOURCE=2 -c -o context.o context.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -std=gnu11 -Iinclude -Wall -Wextra -Werror -O2 -fPIC -fvisibility=hidden -std=gnu11 -I../include -Wall -Wextra -Werror -O2 -D_FORTIFY_SOURCE=2 -c -o codegen.o codegen.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -std=gnu11 -Iinclude -Wall -Wextra -Werror -O2 -fPIC -fvisibility=hidden -std=gnu11 -I../include -Wall -Wextra -Werror -O2 -D_FORTIFY_SOURCE=2 -c -o expression.o expression.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -std=gnu11 -Iinclude -Wall -Wextra -Werror -O2 -fPIC -fvisibility=hidden -std=gnu11 -I../include -Wall -Wextra -Werror -O2 -D_FORTIFY_SOURCE=2 -c -o policy.o policy.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -std=gnu11 -Iinclude -Wall -Wextra -Werror -O2 -fPIC -fvisibility=hidden -std=gnu11 -I../include -Wall -Wextra -Werror -O2 -D_FORTIFY_SOURCE=2 -c -o range_rules.o range_rules.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -std=gnu11 -Iinclude -Wall -Wextra -Werror -O2 -fPIC -fvisibility=hidden -std=gnu11 -I../include -Wall -Wextra -Werror -O2 -D_FORTIFY_SOURCE=2 -c -o syscall.o syscall.c
bison parser.y
cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -std=gnu11 -Iinclude -Wall -Wextra -Werror -O2 -fPIC -fvisibility=hidden -std=gnu11 -I../include -Wall -Wextra -Werror -O2 -D_FORTIFY_SOURCE=2 -c -o syscalls/amd64_syscalls.o syscalls/amd64_syscalls.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -std=gnu11 -Iinclude -Wall -Wextra -Werror -O2 -fPIC -fvisibility=hidden -std=gnu11 -I../include -Wall -Wextra -Werror -O2 -D_FORTIFY_SOURCE=2 -c -o syscalls/i386_syscalls.o syscalls/i386_syscalls.c
g++ -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -O2 -c -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -Wformat -Wformat=2 -Wformat-security -fPIE -Wno-format-nonliteral -Wall -Wextra -Werror -Ikafel/include -pthread -std=c++11 -fno-exceptions -Wno-unused -Wno-unused-parameter -DNSJAIL_NL3_WITH_MACVLAN -I/usr/include/libnl3 caps.cc -o caps.o
cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -std=gnu11 -Iinclude -Wall -Wextra -Werror -O2 -fPIC -fvisibility=hidden -std=gnu11 -I../include -Wall -Wextra -Werror -O2 -D_FORTIFY_SOURCE=2 -c -o syscalls/aarch64_syscalls.o syscalls/aarch64_syscalls.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -std=gnu11 -Iinclude -Wall -Wextra -Werror -O2 -fPIC -fvisibility=hidden -std=gnu11 -I../include -Wall -Wextra -Werror -O2 -D_FORTIFY_SOURCE=2 -c -o syscalls/mipso32_syscalls.o syscalls/mipso32_syscalls.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -std=gnu11 -Iinclude -Wall -Wextra -Werror -O2 -fPIC -fvisibility=hidden -std=gnu11 -I../include -Wall -Wextra -Werror -O2 -D_FORTIFY_SOURCE=2 -c -o syscalls/mips64_syscalls.o syscalls/mips64_syscalls.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -std=gnu11 -Iinclude -Wall -Wextra -Werror -O2 -fPIC -fvisibility=hidden -std=gnu11 -I../include -Wall -Wextra -Werror -O2 -D_FORTIFY_SOURCE=2 -c -o syscalls/arm_syscalls.o syscalls/arm_syscalls.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -std=gnu11 -Iinclude -Wall -Wextra -Werror -O2 -fPIC -fvisibility=hidden -std=gnu11 -I../include -Wall -Wextra -Werror -O2 -D_FORTIFY_SOURCE=2 -c -o kafel.o kafel.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -std=gnu11 -Iinclude -Wall -Wextra -Werror -O2 -fPIC -fvisibility=hidden -std=gnu11 -I../include -Wall -Wextra -Werror -O2 -Wno-error -D_FORTIFY_SOURCE=2 -c -o lexer.o lexer.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -std=gnu11 -Iinclude -Wall -Wextra -Werror -O2 -fPIC -fvisibility=hidden -std=gnu11 -I../include -Wall -Wextra -Werror -O2 -Wno-error -D_FORTIFY_SOURCE=2 -c -o parser.o parser.c
g++ -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -O2 -c -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -Wformat -Wformat=2 -Wformat-security -fPIE -Wno-format-nonliteral -Wall -Wextra -Werror -Ikafel/include -pthread -std=c++11 -fno-exceptions -Wno-unused -Wno-unused-parameter -DNSJAIL_NL3_WITH_MACVLAN -I/usr/include/libnl3 cgroup.cc -o cgroup.o
g++ -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -O2 -c -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -Wformat -Wformat=2 -Wformat-security -fPIE -Wno-format-nonliteral -Wall -Wextra -Werror -Ikafel/include -pthread -std=c++11 -fno-exceptions -Wno-unused -Wno-unused-parameter -DNSJAIL_NL3_WITH_MACVLAN -I/usr/include/libnl3 cmdline.cc -o cmdline.o
protoc --cpp_out=. config.proto
protoc --cpp_out=. config.proto
g++ -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -O2 -c -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -Wformat -Wformat=2 -Wformat-security -fPIE -Wno-format-nonliteral -Wall -Wextra -Werror -Ikafel/include -pthread -std=c++11 -fno-exceptions -Wno-unused -Wno-unused-parameter -DNSJAIL_NL3_WITH_MACVLAN -I/usr/include/libnl3 contain.cc -o contain.o
g++ -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -O2 -c -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -Wformat -Wformat=2 -Wformat-security -fPIE -Wno-format-nonliteral -Wall -Wextra -Werror -Ikafel/include -pthread -std=c++11 -fno-exceptions -Wno-unused -Wno-unused-parameter -DNSJAIL_NL3_WITH_MACVLAN -I/usr/include/libnl3 cpu.cc -o cpu.o
g++ -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -O2 -c -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -Wformat -Wformat=2 -Wformat-security -fPIE -Wno-format-nonliteral -Wall -Wextra -Werror -Ikafel/include -pthread -std=c++11 -fno-exceptions -Wno-unused -Wno-unused-parameter -DNSJAIL_NL3_WITH_MACVLAN -I/usr/include/libnl3 logs.cc -o logs.o
g++ -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -O2 -c -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -Wformat -Wformat=2 -Wformat-security -fPIE -Wno-format-nonliteral -Wall -Wextra -Werror -Ikafel/include -pthread -std=c++11 -fno-exceptions -Wno-unused -Wno-unused-parameter -DNSJAIL_NL3_WITH_MACVLAN -I/usr/include/libnl3 mnt.cc -o mnt.o
cgroup.cc: In function ‘bool cgroup::initNsFromParentMem(nsjconf_t*, pid_t)’:
cgroup.cc:54:33: error: ‘/memory.limit_in_bytes’ directive output may be truncated writing 22 bytes into a region of size between 1 and 4096 [-Werror=format-truncation=]
snprintf(fname, sizeof(fname), "%s/memory.limit_in_bytes", mem_cgroup_path);
^~~~~~~~~~~~~~~~~~~~~~~~~~
cgroup.cc:54:10: note: ‘snprintf’ output between 23 and 4118 bytes into a destination of size 4096
snprintf(fname, sizeof(fname), "%s/memory.limit_in_bytes", mem_cgroup_path);
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cgroup.cc:65:33: error: ‘/memory.oom_control’ directive output may be truncated writing 19 bytes into a region of size between 1 and 4096 [-Werror=format-truncation=]
snprintf(fname, sizeof(fname), "%s/memory.oom_control", mem_cgroup_path);
^~~~~~~~~~~~~~~~~~~~~~~
cgroup.cc:65:10: note: ‘snprintf’ output between 20 and 4115 bytes into a destination of size 4096
snprintf(fname, sizeof(fname), "%s/memory.oom_control", mem_cgroup_path);
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cgroup.cc:73:33: error: ‘/tasks’ directive output may be truncated writing 6 bytes into a region of size between 1 and 4096 [-Werror=format-truncation=]
snprintf(fname, sizeof(fname), "%s/tasks", mem_cgroup_path);
^~~~~~~~~~
cgroup.cc:73:10: note: ‘snprintf’ output between 7 and 4102 bytes into a destination of size 4096
snprintf(fname, sizeof(fname), "%s/tasks", mem_cgroup_path);
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++ -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -O2 -c -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -Wformat -Wformat=2 -Wformat-security -fPIE -Wno-format-nonliteral -Wall -Wextra -Werror -Ikafel/include -pthread -std=c++11 -fno-exceptions -Wno-unused -Wno-unused-parameter -DNSJAIL_NL3_WITH_MACVLAN -I/usr/include/libnl3 net.cc -o net.o
cgroup.cc: In function ‘bool cgroup::initNsFromParentNetCls(nsjconf_t*, pid_t)’:
cgroup.cc:137:33: error: ‘/net_cls.classid’ directive output may be truncated writing 16 bytes into a region of size between 1 and 4096 [-Werror=format-truncation=]
snprintf(fname, sizeof(fname), "%s/net_cls.classid", net_cls_cgroup_path);
^~~~~~~~~~~~~~~~~~~~
cgroup.cc:137:10: note: ‘snprintf’ output between 17 and 4112 bytes into a destination of size 4096
snprintf(fname, sizeof(fname), "%s/net_cls.classid", net_cls_cgroup_path);
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cgroup.cc:146:33: error: ‘/tasks’ directive output may be truncated writing 6 bytes into a region of size between 1 and 4096 [-Werror=format-truncation=]
snprintf(fname, sizeof(fname), "%s/tasks", net_cls_cgroup_path);
^~~~~~~~~~
cgroup.cc:146:10: note: ‘snprintf’ output between 7 and 4102 bytes into a destination of size 4096
snprintf(fname, sizeof(fname), "%s/tasks", net_cls_cgroup_path);
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cgroup.cc: In function ‘bool cgroup::initNsFromParentCpu(nsjconf_t*, pid_t)’:
cgroup.cc:174:33: error: ‘/cpu.cfs_quota_us’ directive output may be truncated writing 17 bytes into a region of size between 1 and 4096 [-Werror=format-truncation=]
snprintf(fname, sizeof(fname), "%s/cpu.cfs_quota_us", cpu_cgroup_path);
^~~~~~~~~~~~~~~~~~~~~
cgroup.cc:174:10: note: ‘snprintf’ output between 18 and 4113 bytes into a destination of size 4096
snprintf(fname, sizeof(fname), "%s/cpu.cfs_quota_us", cpu_cgroup_path);
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cgroup.cc:183:33: error: ‘/cpu.cfs_period_us’ directive output may be truncated writing 18 bytes into a region of size between 1 and 4096 [-Werror=format-truncation=]
snprintf(fname, sizeof(fname), "%s/cpu.cfs_period_us", cpu_cgroup_path);
^~~~~~~~~~~~~~~~~~~~~~
cgroup.cc:183:10: note: ‘snprintf’ output between 19 and 4114 bytes into a destination of size 4096
snprintf(fname, sizeof(fname), "%s/cpu.cfs_period_us", cpu_cgroup_path);
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cgroup.cc:192:33: error: ‘/tasks’ directive output may be truncated writing 6 bytes into a region of size between 1 and 4096 [-Werror=format-truncation=]
snprintf(fname, sizeof(fname), "%s/tasks", cpu_cgroup_path);
^~~~~~~~~~
cgroup.cc:192:10: note: ‘snprintf’ output between 7 and 4102 bytes into a destination of size 4096
snprintf(fname, sizeof(fname), "%s/tasks", cpu_cgroup_path);
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cgroup.cc: In function ‘bool cgroup::initNsFromParentPids(nsjconf_t*, pid_t)’:
cgroup.cc:99:33: error: ‘/pids.max’ directive output may be truncated writing 9 bytes into a region of size between 1 and 4096 [-Werror=format-truncation=]
snprintf(fname, sizeof(fname), "%s/pids.max", pids_cgroup_path);
^~~~~~~~~~~~~
cgroup.cc:99:10: note: ‘snprintf’ output between 10 and 4105 bytes into a destination of size 4096
snprintf(fname, sizeof(fname), "%s/pids.max", pids_cgroup_path);
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cgroup.cc:108:33: error: ‘/tasks’ directive output may be truncated writing 6 bytes into a region of size between 1 and 4096 [-Werror=format-truncation=]
snprintf(fname, sizeof(fname), "%s/tasks", pids_cgroup_path);
^~~~~~~~~~
cgroup.cc:108:10: note: ‘snprintf’ output between 7 and 4102 bytes into a destination of size 4096
snprintf(fname, sizeof(fname), "%s/tasks", pids_cgroup_path);
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++ -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -O2 -c -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -Wformat -Wformat=2 -Wformat-security -fPIE -Wno-format-nonliteral -Wall -Wextra -Werror -Ikafel/include -pthread -std=c++11 -fno-exceptions -Wno-unused -Wno-unused-parameter -DNSJAIL_NL3_WITH_MACVLAN -I/usr/include/libnl3 nsjail.cc -o nsjail.o
cc -Wl,-soname,../libkafel.so.1 -shared kafel.o context.o codegen.o expression.o policy.o range_rules.o syscall.o lexer.o parser.o syscalls/amd64_syscalls.o syscalls/i386_syscalls.o syscalls/aarch64_syscalls.o syscalls/mipso32_syscalls.o syscalls/mips64_syscalls.o syscalls/arm_syscalls.o -o ../libkafel.so
cc1plus: all warnings being treated as errors
make: *** [Makefile:63: cgroup.o] Error 1
make: *** Waiting for unfinished jobs....
ld -r kafel.o context.o codegen.o expression.o policy.o range_rules.o syscall.o lexer.o parser.o syscalls/amd64_syscalls.o syscalls/i386_syscalls.o syscalls/aarch64_syscalls.o syscalls/mipso32_syscalls.o syscalls/mips64_syscalls.o syscalls/arm_syscalls.o -o libkafel_r.o
objcopy --localize-hidden libkafel_r.o libkafel.o
rm -f libkafel_r.o
ar rcs ../libkafel.a libkafel.o
rm -f libkafel.o
make[2]: Leaving directory '/build/nsjail/src/nsjail-2.7/kafel/src'
make[1]: Leaving directory '/build/nsjail/src/nsjail-2.7/kafel'