Skip to content

Commit

Permalink
Update falcosecurity-libs to latest (0.20.0).
Browse files Browse the repository at this point in the history
* cmake/modules/falcosecurity-libs.cmake: Require falcosecurity-libs
0.20.0; update version string and checksum.
* userspace/chisel/chisel_api.cpp (lua_cbacks::get_thread_table_int):
Adjust for falcosecurity-libs commit
417e523399796d7290a479fd55988e62e80fc97e ("drop user and group infos
embedded in threadinfo.").

Fixes: #2132
  • Loading branch information
Apteryks committed Jan 23, 2025
1 parent 1ed7ec0 commit 0cacaea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions cmake/modules/falcosecurity-libs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ option(USE_BUNDLED_FALCOSECURITY_LIBS

if(NOT USE_BUNDLED_FALCOSECURITY_LIBS)
find_package(PkgConfig REQUIRED)
pkg_check_modules(LIBSINSP REQUIRED IMPORTED_TARGET libsinsp)
pkg_check_modules(LIBSINSP REQUIRED IMPORTED_TARGET libsinsp>=0.20.0)
message(STATUS "Found libsinsp:
include: ${LIBSINSP_INCLUDE_DIRS}
lib: ${LIBSINSP_LIBRARIES}
Expand All @@ -47,8 +47,8 @@ else()
# In case you want to test against another falcosecurity/libs version (or branch, or commit) just pass the variable -
# ie., `cmake -DFALCOSECURITY_LIBS_VERSION=dev ..`
if(NOT FALCOSECURITY_LIBS_VERSION)
set(FALCOSECURITY_LIBS_VERSION "0.19.0")
set(FALCOSECURITY_LIBS_CHECKSUM "SHA256=77c38b45c8b29c4da4f8ce49da68278b347a403ff1075307ff0cf540596303ac")
set(FALCOSECURITY_LIBS_VERSION "0.20.0")
set(FALCOSECURITY_LIBS_CHECKSUM "SHA256=4ae6ddb42a1012bacd88c63abdaa7bd27ca0143c4721338a22c45597e63bc99d")
endif()

# cd /path/to/build && cmake /path/to/source
Expand Down
7 changes: 4 additions & 3 deletions userspace/chisel/chisel_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -842,10 +842,10 @@ int lua_cbacks::get_thread_table_int(lua_State *ls, bool include_fds, bool bareb
lua_pushnumber(ls, (uint32_t)tinfo.m_fdlimit);
lua_settable(ls, -3);
lua_pushliteral(ls, "uid");
lua_pushnumber(ls, (uint32_t)tinfo.m_user.uid());
lua_pushnumber(ls, (uint32_t)tinfo.m_uid);
lua_settable(ls, -3);
lua_pushliteral(ls, "gid");
lua_pushnumber(ls, (uint32_t)tinfo.m_group.gid());
lua_pushnumber(ls, (uint32_t)tinfo.m_gid);
lua_settable(ls, -3);
lua_pushliteral(ls, "nchilds");
lua_pushnumber(ls, (uint32_t)tinfo.get_num_not_leader_threads());
Expand All @@ -872,8 +872,9 @@ int lua_cbacks::get_thread_table_int(lua_State *ls, bool include_fds, bool bareb
//
// Extract the user name
//
auto user = tinfo.get_user();
lua_pushliteral(ls, "username");
lua_pushstring(ls, tinfo.m_user.name().c_str());
lua_pushstring(ls, user->name);
lua_settable(ls, -3);

//
Expand Down

0 comments on commit 0cacaea

Please sign in to comment.