Loading CMakeLists.txt +3 −0 Original line number Diff line number Diff line Loading @@ -106,6 +106,9 @@ message(STATUS "RPC protocol: '${RPC_PROTOCOL}'") option(USE_SHM "Use shared memory for intra-node communication" ON) message(STATUS "Shared-memory communication: ${USE_SHM}") option(LOG_SYSCALLS "Enable verbose logging for syscalls interception" OFF) message(STATUS "Syscall logging: ${LOG_SYSCALLS}") option(SYMLINK_SUPPORT "Compile with support for symlinks" ON) if(SYMLINK_SUPPORT) add_definitions(-DHAS_SYMLINKS) Loading include/global/configure.hpp.in +2 −0 Original line number Diff line number Diff line Loading @@ -69,4 +69,6 @@ #define DEFAULT_PRELOAD_LOG_LEVEL 4 // info #define DEFAULT_DAEMON_LOG_LEVEL 4 // info #cmakedefine01 LOG_SYSCALLS #endif //FS_CONFIGURE_H src/client/intercept.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -14,8 +14,9 @@ #include "client/intercept.hpp" #include "client/preload.hpp" #include "client/hooks.hpp" #include "global/configure.hpp" #ifndef NDEBUG #if LOG_SYSCALLS #include "client/syscall_names.hpp" #endif Loading Loading @@ -303,13 +304,13 @@ static inline int hook(long syscall_number, * as would normally happen. */ #ifndef NDEBUG #if LOG_SYSCALLS CTX->log()->trace("Syscall [{}, {}] Passthrough", syscall_names[syscall_number], syscall_number); #endif return NOT_HOOKED; } #ifndef NDEBUG #if LOG_SYSCALLS CTX->log()->trace("Syscall [{}, {}] Intercepted", syscall_names[syscall_number], syscall_number); #endif return HOOKED; Loading src/daemon/main.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -321,6 +321,11 @@ int main(int argc, const char* argv[]) { cout << "Shared-memory comm: ON" << endl; #else cout << "Shared-memory comm: OFF" << endl; #endif #if LOG_SYSCALLS cout << "Syscalls logging: ON" << endl; #else cout << "Syscalls logging: OFF" << endl; #endif cout << "Chunk size: " << CHUNKSIZE << " bytes" << endl; return 0; Loading Loading
CMakeLists.txt +3 −0 Original line number Diff line number Diff line Loading @@ -106,6 +106,9 @@ message(STATUS "RPC protocol: '${RPC_PROTOCOL}'") option(USE_SHM "Use shared memory for intra-node communication" ON) message(STATUS "Shared-memory communication: ${USE_SHM}") option(LOG_SYSCALLS "Enable verbose logging for syscalls interception" OFF) message(STATUS "Syscall logging: ${LOG_SYSCALLS}") option(SYMLINK_SUPPORT "Compile with support for symlinks" ON) if(SYMLINK_SUPPORT) add_definitions(-DHAS_SYMLINKS) Loading
include/global/configure.hpp.in +2 −0 Original line number Diff line number Diff line Loading @@ -69,4 +69,6 @@ #define DEFAULT_PRELOAD_LOG_LEVEL 4 // info #define DEFAULT_DAEMON_LOG_LEVEL 4 // info #cmakedefine01 LOG_SYSCALLS #endif //FS_CONFIGURE_H
src/client/intercept.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -14,8 +14,9 @@ #include "client/intercept.hpp" #include "client/preload.hpp" #include "client/hooks.hpp" #include "global/configure.hpp" #ifndef NDEBUG #if LOG_SYSCALLS #include "client/syscall_names.hpp" #endif Loading Loading @@ -303,13 +304,13 @@ static inline int hook(long syscall_number, * as would normally happen. */ #ifndef NDEBUG #if LOG_SYSCALLS CTX->log()->trace("Syscall [{}, {}] Passthrough", syscall_names[syscall_number], syscall_number); #endif return NOT_HOOKED; } #ifndef NDEBUG #if LOG_SYSCALLS CTX->log()->trace("Syscall [{}, {}] Intercepted", syscall_names[syscall_number], syscall_number); #endif return HOOKED; Loading
src/daemon/main.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -321,6 +321,11 @@ int main(int argc, const char* argv[]) { cout << "Shared-memory comm: ON" << endl; #else cout << "Shared-memory comm: OFF" << endl; #endif #if LOG_SYSCALLS cout << "Syscalls logging: ON" << endl; #else cout << "Syscalls logging: OFF" << endl; #endif cout << "Chunk size: " << CHUNKSIZE << " bytes" << endl; return 0; Loading