Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
216bd5e
Added DLLEncryptor. Currently unused.
argmarco-tkd Jul 8, 2025
5059384
creating empty DLL Encryptor. Some wiring.
argmarco-tkd Jul 9, 2025
a35c9ac
DLLEncryptor succesfully loaded (via the Loader) from the mini-app.
argmarco-tkd Jul 9, 2025
a61d2a9
Refactored and separated the DLLEncryptorLoader from DLLEncryptor impl
argmarco-tkd Jul 11, 2025
9717f7e
Refactoring. Began the renaming of DLLEncryptorLoader into LoadableEn…
argmarco-tkd Jul 14, 2025
e99e3e9
Extracted LoadableEncryptorInterface into its own file.
argmarco-tkd Jul 15, 2025
323e608
adding a few utils to Dockerfile.miniApp
argmarco-tkd Aug 2, 2025
30a2b35
adding parallelism to ./ninja to the helper build scripts
argmarco-tkd Aug 5, 2025
958f8a9
created the parquet/encryption/[external] folder to put external encr…
argmarco-tkd Aug 5, 2025
6243e77
First pass at implementing DBPALibraryWrapper - tests not added yet.
argmarco-tkd Aug 5, 2025
d391d71
cleaning up the impl of LoadFromLibrary()
argmarco-tkd Aug 5, 2025
edff151
Defined DBPATestAgent as a simple agent for testing loading machinery…
argmarco-tkd Aug 5, 2025
6c8f265
moving DBPALibraryWrapper into its own .h and .cc files. No tests yet.
argmarco-tkd Aug 5, 2025
a62b405
Adding the option to pass a function to close the shared library. Thi…
argmarco-tkd Aug 6, 2025
0248ef6
Reviewed and improved the testing suite. All the tests for dbpa_libra…
argmarco-tkd Aug 6, 2025
1db72b6
Reviewed and improved the testing suite. All the tests for dbpa_libra…
argmarco-tkd Aug 6, 2025
3bf7406
ensuring that WIN32 stuff throws an exception (unimplemented)
argmarco-tkd Aug 6, 2025
3b09ef3
commented out the references to loadble_encryptor_utils and to DLL lo…
argmarco-tkd Aug 6, 2025
4d52fc7
Added a default value (function) for the handle_closing_fn parameter …
argmarco-tkd Aug 6, 2025
e91a805
Modified LoadableEncryptorUtils to work with DBPAInterface, instead o…
argmarco-tkd Aug 6, 2025
7d5b847
Adding tests for loadable_encryptor_utils
argmarco-tkd Aug 7, 2025
300ddb3
Added CloseDynamicLibrary() to arrow/util/io_util.cc
argmarco-tkd Aug 7, 2025
bdafe6c
Replaced the "custom" usage of dlopen, dlsym, etc to handle Shared Li…
argmarco-tkd Aug 7, 2025
c33df5c
better casting
argmarco-tkd Aug 7, 2025
be838ef
Added better heuristics to find the *.so file during tests
argmarco-tkd Aug 7, 2025
08b817f
Removed references to DLLEncryptor (sources, CMake configs)
argmarco-tkd Aug 7, 2025
99a0d64
working
sofia-tekdatum Jul 22, 2025
7beec95
closing decryption loop in miniapp. super hacky code, pls ignore
sofia-tekdatum Aug 4, 2025
4747aef
Removing unnecessary prints
sofia-tekdatum Aug 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Dockerfile.miniApp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ WORKDIR /arrowdev
# Clone mini-app source
RUN git clone -b dev-miniapp https://github.com/protegrity/arrow.git .

# some utils
RUN apt-get update && \
apt-get install -y gdb valgrind vim thrift-compiler less

# Build Arrow C++ libraries
RUN cd /arrowdev/cpp && \
rm -rf build && \
Expand Down
14 changes: 14 additions & 0 deletions build-clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
cd /arrowdev/cpp

rm -rf build && mkdir build && cd build
cmake -GNinja \
-DARROW_WITH_SNAPPY=ON \
-DCMAKE_INSTALL_PREFIX=$(pwd)/install \
-DARROW_PARQUET=ON \
-DPARQUET_REQUIRE_ENCRYPTION=ON \
-DARROW_COMPUTE=ON \
-DARROW_PYTHON=ON \
-DCMAKE_BUILD_TYPE=Debug \
..
ninja install -j 8

16 changes: 16 additions & 0 deletions build-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
cd /arrowdev/cpp/build

cmake -GNinja \
-DARROW_WITH_SNAPPY=ON \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=$(pwd)/install \
-DARROW_PARQUET=ON \
-DPARQUET_REQUIRE_ENCRYPTION=ON \
-DARROW_PYTHON=ON \
-DARROW_COMPUTE=ON \
-DARROW_TESTING=ON \
-DARROW_BUILD_TESTS=ON \
..

ninja install -j 4

13 changes: 13 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
cd /arrowdev/cpp/build

cmake -GNinja \
-DARROW_WITH_SNAPPY=ON \
-DCMAKE_INSTALL_PREFIX=$(pwd)/install \
-DARROW_PARQUET=ON \
-DPARQUET_REQUIRE_ENCRYPTION=ON \
-DARROW_COMPUTE=ON \
-DARROW_PYTHON=ON \
-DCMAKE_BUILD_TYPE=Debug \
..
ninja install -j 8

20 changes: 20 additions & 0 deletions cpp/src/arrow/util/io_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2278,4 +2278,24 @@ Result<void*> GetSymbol(void* handle, const char* name) {
#endif
}

Status CloseDynamicLibrary(void* handle) {
if (handle == nullptr) {
return Status::Invalid("Attempting to close null library handle");
}
#ifdef _WIN32
if (FreeLibrary(reinterpret_cast<HMODULE>(handle))) {
return Status::OK();
}
// win32 api doc: "If the function fails, the return value is zero."
return IOErrorFromWinError(GetLastError(), "FreeLibrary() failed");
#else
if (dlclose(handle) == 0) {
return Status::OK();
}
// dlclose(3) man page: "On success, dlclose() returns 0; on error, it returns a nonzero value."
auto* error = dlerror();
return Status::IOError("dlclose() failed: ", error ? error : "unknown error");
#endif
}

} // namespace arrow::internal
7 changes: 7 additions & 0 deletions cpp/src/arrow/util/io_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,13 @@ ARROW_EXPORT Result<void*> LoadDynamicLibrary(const char* path);
/// returned; instead an error will be raised.
ARROW_EXPORT Result<void*> GetSymbol(void* handle, const char* name);

/// \brief Close a dynamic library
///
/// This wraps dlclose() except on Windows, where FreeLibrary() is called.
///
/// \return Status::OK() if the library was closed successfully, otherwise an error is returned.
ARROW_EXPORT Status CloseDynamicLibrary(void* handle);

template <typename T>
Result<T*> GetSymbolAs(void* handle, const char* name) {
ARROW_ASSIGN_OR_RAISE(void* sym, GetSymbol(handle, name));
Expand Down
Loading
Loading