修复编译器警告

This commit is contained in:
LiYang 2016-08-21 19:32:25 +08:00
parent f1073c40b2
commit c28ef97aa5
2 changed files with 3 additions and 3 deletions

View File

@ -7,7 +7,7 @@ before_install:
- sudo apt-get install libseccomp-dev cmake
install:
- mkdir build && cd build
- cmake .. && make && make install
- cmake .. && make && sudo make install
- cd ../bindings/Python && python setup.py install
script:
- cd tests && sudo python test.py
- cd ../../tests && sudo python test.py

View File

@ -24,7 +24,7 @@ int load_seccomp(void *dl_handler, struct config *_config) {
}
}
// add extra rule for execve
if (seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(execve), 1, SCMP_A0(SCMP_CMP_EQ, _config->exe_path)) != 0) {
if (seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(execve), 1, SCMP_A0(SCMP_CMP_EQ, (scmp_datum_t)(_config->exe_path))) != 0) {
return LOAD_SECCOMP_FAILED;
}
// only fd 0 1 2 are allowed