Open cuckoo-linux opened 4 years ago
Hey, sorry for the delay. Just back at the office :). Can you try the patch above if that resolves the issue for you? Thanks!
When i try this bazel build pathauditor/libc:libpath_auditor.so
=>Facing below error, my os is centos 7
INFO: Analyzed target //pathauditor/libc:libpath_auditor.so (0 packages loaded, 0 targets configured). INFO: Found 1 target... ERROR: /home/oracle/rnd/path-auditor/pathauditor/BUILD:10:1: C++ compilation of rule '//pathauditor:pathauditor' failed (Exit 1) gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++0x' -MD -MF ... (remaining 43 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox
pathauditor/pathauditor.cc: In function 'pathauditor::StatusOr
Use --sandbox_debug to see verbose messages from the sandbox
pathauditor/pathauditor.cc: In function 'pathauditor::StatusOr
Use --sandbox_debug to see verbose messages from the sandbox
pathauditor/pathauditor.cc: In function 'pathauditor::StatusOr
@p-g-krish I updated the pull request #4, could you try it out if it resolves the issue for you? I.e. the changes are in the define_cgroup2_magic branch.
when I tried to build it using bazel by this command: bazel build //pathauditor/libc:libpath_auditor.so Got this error: INFO: Analyzed target //pathauditor/libc:libpath_auditor.so (0 packages loaded, 0 targets configured). INFO: Found 1 target... ERROR: /home/machine/Downloads/path-auditor-master/pathauditor/BUILD:10:1: C++ compilation of rule '//pathauditor:pathauditor' failed (Exit 1) gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++0x' -MD -MF ... (remaining 43 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox pathauditor/pathauditor.cc: In function 'pathauditor::StatusOr pathauditor::{anonymous}::FileIsUserControlled(int, absl::string_view)':
pathauditor/pathauditor.cc:160:24: error: 'CGROUP2_SUPER_MAGIC' was not declared in this scope
fs_buf.f_type == CGROUP2_SUPER_MAGIC) {
^
pathauditor/pathauditor.cc: In function 'pathauditor::StatusOr pathauditor::PathIsUserControlled(const pathauditor::ProcessInformation&, absl::string_view, absl::optional, unsigned int)':
pathauditor/pathauditor.cc:224:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < max_iteration_count; i++) {
^
pathauditor/pathauditor.cc:293:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (link_len >= link_buf.memsize()) {
^
Target //pathauditor/libc:libpath_auditor.so failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 3.612s, Critical Path: 2.10s
INFO: 1 process: 1 linux-sandbox.
FAILED: Build did NOT complete successfully