Unverified Commit 70a5c724 authored by Tommaso Tocci's avatar Tommaso Tocci
Browse files

Add CREATE_CHECK_PARENTS compilation flag

CREATE_CHECK_PARENTS controls if the existance of the parent node needs
to be checked during the creation of a child node.

Example: The check prevents the creation of file `/parent/child`
if `/parent` doesn't exists or if it is not a directory

By default CREATE_CHECK_PARENTS is enable and the check is enforced.
It can be disable to speedup creation operations by passing
`-DCREATE_CHECK_PARENTS:BOOL=OFF` as cmake parameter.
parent c0c28980
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -110,6 +110,9 @@ message(STATUS "Shared-memory communication: ${USE_SHM}")
option(LOG_SYSCALLS "Enable verbose logging for syscalls interception" OFF)
message(STATUS "Syscall logging: ${LOG_SYSCALLS}")

option(CREATE_CHECK_PARENTS "Check parent directory existance before creating child node" ON)
message(STATUS "Create checks parents: ${CREATE_CHECK_PARENTS}")

option(SYMLINK_SUPPORT "Compile with support for symlinks" ON)
if(SYMLINK_SUPPORT)
    add_definitions(-DHAS_SYMLINKS)
+1 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@

#define RPC_PROTOCOL "@RPC_PROTOCOL@"
#cmakedefine01 USE_SHM
#cmakedefine01 CREATE_CHECK_PARENTS

#define CHUNKSIZE 524288 // in bytes 512KB

+5 −0
Original line number Diff line number Diff line
@@ -322,6 +322,11 @@ int main(int argc, const char* argv[]) {
#else
        cout << "Shared-memory comm: OFF" << endl;
#endif
#if CREATE_CHECK_PARENTS
        cout << "Create check parents: ON" << endl;
#else
        cout << "Create check parents: OFF" << endl;
#endif
#if LOG_SYSCALLS
        cout << "Syscalls logging: ON" << endl;
#else
+1 −1

File changed.

Contains only whitespace changes.