From 2fa464a837e5b790a643f76ea9f841f7a235ff06 Mon Sep 17 00:00:00 2001 From: Lorenzo Susini Date: Tue, 15 Oct 2024 11:03:15 +0000 Subject: [PATCH] chore: address review comments Signed-off-by: Lorenzo Susini --- userspace/libsinsp/sinsp_filtercheck_container.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/userspace/libsinsp/sinsp_filtercheck_container.cpp b/userspace/libsinsp/sinsp_filtercheck_container.cpp index 7e4a691ed5..c0c6a2e5da 100644 --- a/userspace/libsinsp/sinsp_filtercheck_container.cpp +++ b/userspace/libsinsp/sinsp_filtercheck_container.cpp @@ -242,19 +242,19 @@ static const filtercheck_field_info sinsp_filter_check_container_fields[] = { PF_NA, "container.host_pid", "Host PID Namespace", - "'true' if the process is running in the host PID namespace, 'false' otherwise."}, + "'true' if the container is running in the host PID namespace, 'false' otherwise."}, {PT_BOOL, EPF_NONE, PF_NA, "container.host_network", "Host Network Namespace", - "'true' if the process is running in the host network namespace, 'false' otherwise."}, + "'true' if the container is running in the host network namespace, 'false' otherwise."}, {PT_BOOL, EPF_NONE, PF_NA, "container.host_ipc", "Host IPC Namespace", - "'true' if the process is running in the host IPC namespace, 'false' otherwise."}, + "'true' if the container is running in the host IPC namespace, 'false' otherwise."}, }; sinsp_filter_check_container::sinsp_filter_check_container() { @@ -522,7 +522,7 @@ uint8_t *sinsp_filter_check_container::extract_single(sinsp_evt *evt, case TYPE_CONTAINER_HOST_PID: case TYPE_CONTAINER_HOST_NETWORK: case TYPE_CONTAINER_HOST_IPC: - if(tinfo->m_container_id.empty()) { + if(is_host) { return NULL; } else { if(!container_info) { @@ -531,7 +531,7 @@ uint8_t *sinsp_filter_check_container::extract_single(sinsp_evt *evt, // Only return a true/false value for // container types where we really know the - // host_pid status. // todo(loresuso): double check this + // host_pid, host_network, host_ipc status. if(!is_docker_compatible(container_info->m_type)) { return NULL; }