Loading src/client/gkfs_libc.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -46,8 +46,8 @@ #include <linux/const.h> std::atomic<bool> activated{false}; std::atomic<bool> initializing{false}; #define debug_info printf // #define debug_info(...) //#define debug_info printf #define debug_info(...) int (*real_open)(char*, int, mode_t) = NULL; Loading Loading @@ -1130,7 +1130,7 @@ ssize_t write(int fd, const void* buf, size_t nbyte) { initializeGekko(); if(CTX->file_map()->exist(fd)) { debug_info("%d [WRITE from GKFS]....%d \n", gettid(), fd); debug_info("[WRITE from GKFS]....%d \n", fd); return gkfs::syscall::gkfs_write(fd, buf, nbyte); } Loading Loading @@ -1396,7 +1396,7 @@ statx(int dirfd, const char* path, int flags, unsigned int mask, struct statx* statxbuf) { debug_info("%d [BYPASS] >> Begin statx....%s\n", gettid(), path); debug_info("[BYPASS] >> Begin statx....%s\n", path); initializeGekko(); // Is path from GekkoFS? if(CTX->interception_enabled()) { Loading Loading @@ -1988,7 +1988,7 @@ realpath(const char* path, char* resolved_path) { // is gekkofs initializeGekko(); if(CTX->interception_enabled()) { /* if(CTX->interception_enabled()) { std::string resolved; auto rstatus = CTX->relativize_fd_path(AT_FDCWD, path, resolved); Loading @@ -2005,7 +2005,7 @@ realpath(const char* path, char* resolved_path) { return resolved_path; } } */ // call the real realpath function char* ret = dlsym_realpath((char*) path, resolved_path); Loading src/client/preload.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -509,7 +509,7 @@ at_child_syscall() { void init_libc() { printf("%d -> %p At init GEKKOFS\n", gettid(), (void*) CTX); // fork does //printf("%d -> %p At init GEKKOFS\n", gettid(), (void*) CTX); // fork does CTX->init_logging(); // from here ownwards it is safe to print messages LOG(DEBUG, "Logging subsystem initialized"); Loading @@ -520,7 +520,7 @@ init_libc() { void destroy_libc() { printf("%d At close library GEKKOFS\n", gettid()); //printf("%d At close library GEKKOFS\n", gettid()); CTX->disable_interception(); CTX->clear_hosts(); LOG(DEBUG, "Peer information deleted"); Loading Loading
src/client/gkfs_libc.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -46,8 +46,8 @@ #include <linux/const.h> std::atomic<bool> activated{false}; std::atomic<bool> initializing{false}; #define debug_info printf // #define debug_info(...) //#define debug_info printf #define debug_info(...) int (*real_open)(char*, int, mode_t) = NULL; Loading Loading @@ -1130,7 +1130,7 @@ ssize_t write(int fd, const void* buf, size_t nbyte) { initializeGekko(); if(CTX->file_map()->exist(fd)) { debug_info("%d [WRITE from GKFS]....%d \n", gettid(), fd); debug_info("[WRITE from GKFS]....%d \n", fd); return gkfs::syscall::gkfs_write(fd, buf, nbyte); } Loading Loading @@ -1396,7 +1396,7 @@ statx(int dirfd, const char* path, int flags, unsigned int mask, struct statx* statxbuf) { debug_info("%d [BYPASS] >> Begin statx....%s\n", gettid(), path); debug_info("[BYPASS] >> Begin statx....%s\n", path); initializeGekko(); // Is path from GekkoFS? if(CTX->interception_enabled()) { Loading Loading @@ -1988,7 +1988,7 @@ realpath(const char* path, char* resolved_path) { // is gekkofs initializeGekko(); if(CTX->interception_enabled()) { /* if(CTX->interception_enabled()) { std::string resolved; auto rstatus = CTX->relativize_fd_path(AT_FDCWD, path, resolved); Loading @@ -2005,7 +2005,7 @@ realpath(const char* path, char* resolved_path) { return resolved_path; } } */ // call the real realpath function char* ret = dlsym_realpath((char*) path, resolved_path); Loading
src/client/preload.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -509,7 +509,7 @@ at_child_syscall() { void init_libc() { printf("%d -> %p At init GEKKOFS\n", gettid(), (void*) CTX); // fork does //printf("%d -> %p At init GEKKOFS\n", gettid(), (void*) CTX); // fork does CTX->init_logging(); // from here ownwards it is safe to print messages LOG(DEBUG, "Logging subsystem initialized"); Loading @@ -520,7 +520,7 @@ init_libc() { void destroy_libc() { printf("%d At close library GEKKOFS\n", gettid()); //printf("%d At close library GEKKOFS\n", gettid()); CTX->disable_interception(); CTX->clear_hosts(); LOG(DEBUG, "Peer information deleted"); Loading