Loading ifs/include/preload/passthrough.hpp +2 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,8 @@ extern void* libc_opendir; extern void* libc_readdir; extern void* libc_closedir; extern void* libc_chdir; void init_passthrough_if_needed(); #endif //IFS_PASSTHROUGH_HPP ifs/src/preload/intcp_functions.cpp +13 −1 Original line number Diff line number Diff line Loading @@ -498,3 +498,15 @@ int intcp_closedir(DIR* dirp) { } return (reinterpret_cast<decltype(&closedir)>(libc_closedir))(dirp); } int chdir(const char* path){ init_passthrough_if_needed(); CTX->log()->trace("{}() called with path {}", __func__, path); std::string rel_path(path); if (CTX->relativize_path(rel_path)) { CTX->log()->error("Attempt to chdir into adafs namespace: NOT SUPPORTED", __func__, path); errno = ENOTSUP; return -1; } return (reinterpret_cast<decltype(&chdir)>(libc_chdir))(path); } ifs/src/preload/passthrough.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,9 @@ void* libc_opendir; void* libc_readdir; void* libc_closedir; void* libc_chdir; void init_passthrough_() { libc = dlopen("libc.so.6", RTLD_LAZY); if(libc == nullptr){ Loading Loading @@ -126,6 +129,8 @@ void init_passthrough_() { libc_readdir = dlsym(libc, "readdir"); libc_closedir = dlsym(libc, "closedir"); libc_chdir = dlsym(libc, "chdir"); fs_config = std::make_shared<struct FsConfig>(); //set the spdlogger and initialize it with spdlog Loading Loading
ifs/include/preload/passthrough.hpp +2 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,8 @@ extern void* libc_opendir; extern void* libc_readdir; extern void* libc_closedir; extern void* libc_chdir; void init_passthrough_if_needed(); #endif //IFS_PASSTHROUGH_HPP
ifs/src/preload/intcp_functions.cpp +13 −1 Original line number Diff line number Diff line Loading @@ -498,3 +498,15 @@ int intcp_closedir(DIR* dirp) { } return (reinterpret_cast<decltype(&closedir)>(libc_closedir))(dirp); } int chdir(const char* path){ init_passthrough_if_needed(); CTX->log()->trace("{}() called with path {}", __func__, path); std::string rel_path(path); if (CTX->relativize_path(rel_path)) { CTX->log()->error("Attempt to chdir into adafs namespace: NOT SUPPORTED", __func__, path); errno = ENOTSUP; return -1; } return (reinterpret_cast<decltype(&chdir)>(libc_chdir))(path); }
ifs/src/preload/passthrough.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,9 @@ void* libc_opendir; void* libc_readdir; void* libc_closedir; void* libc_chdir; void init_passthrough_() { libc = dlopen("libc.so.6", RTLD_LAZY); if(libc == nullptr){ Loading Loading @@ -126,6 +129,8 @@ void init_passthrough_() { libc_readdir = dlsym(libc, "readdir"); libc_closedir = dlsym(libc, "closedir"); libc_chdir = dlsym(libc, "chdir"); fs_config = std::make_shared<struct FsConfig>(); //set the spdlogger and initialize it with spdlog Loading