mirror of
https://github.com/QingdaoU/Judger.git
synced 2025-01-01 09:51:41 +00:00
修复编译器警告
This commit is contained in:
parent
f1073c40b2
commit
c28ef97aa5
@ -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
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user