From a1f76f6419f969c35c9698157fe629e3836a66f1 Mon Sep 17 00:00:00 2001 From: Wiktor Golgowski Date: Thu, 17 Aug 2023 13:18:40 +0000 Subject: [PATCH] fix(scap): initialize cgroup interface during platform init. Signed-off-by: Wiktor Golgowski --- userspace/libscap/linux/scap_linux_platform.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/userspace/libscap/linux/scap_linux_platform.c b/userspace/libscap/linux/scap_linux_platform.c index 3504a97e74..d299ce96fd 100644 --- a/userspace/libscap/linux/scap_linux_platform.c +++ b/userspace/libscap/linux/scap_linux_platform.c @@ -79,6 +79,13 @@ int32_t scap_linux_init_platform(struct scap_platform* platform, char* lasterr, } } + rc = scap_cgroup_interface_init(&linux_platform->m_cgroups, scap_get_host_root(), lasterr, false); + if(rc != SCAP_SUCCESS) + { + scap_linux_free_platform(platform); + return rc; + } + linux_platform->m_lasterr[0] = '\0'; char proc_scan_err[SCAP_LASTERR_SIZE]; rc = scap_linux_refresh_proc_table(platform, &platform->m_proclist);