mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-06 17:45:22 +00:00
46c1e6d8be
- Add the possibility of running table logic inside a container namespace, so that's possible to query it instead of the host. Needs minor modifications to each table logic and how they use logging. In practice it works by having a pid_with_namespace column, which should contain pids that are in the same mount namespace of the container one wants to query. The worker receives that column as a constraint, prepares two unnamed pipes for read/write communications with the future child, then forks into a new process. While the parent sends a query job to the just created child and then waits for results, the child receives the job, takes all the values given in the pid_with_namespace constraint, retrieves the fd of the mount namespace under "/proc/<constraint pid>/ns/mnt", then switches to it. Finally it runs the table logic, sending the results back to the parent through the pipe with a JSON message. Important to note that the logging in the table logic is not GLOG directly, because in the child this is in an unknown state; a custom logging system that resembles glog and that takes advantage of the existing communication channel is used to send the messages in JSON format to the parent, which will take care to forward to GLOG. - Add FLAGS_keep_container_worker_open so that the process used for accessing a container is kept open, until the queries are for the same table; when the table changes, the process will be closed and a new one created. This is off by default, which means that a new process will be always created. - Implemented a way to run tests that require root separated from the others. The OSQUERY_BUILD_ROOT_TESTS has been added to requests such tests to be built. To run only tests which require a normal user, one has to use `ctest -LE "root-required"`, while `sudo ctest -L "root-required"` to run those who need root. PR: osquery/osquery#6209 |
||
---|---|---|
.. | ||
modules | ||
wix_patches | ||
CPackConfig.cmake.in | ||
flags.cmake | ||
globals.cmake | ||
options.cmake | ||
packaging.cmake | ||
toolchain.cmake | ||
utilities.cmake |