diff --git a/Libraries/LibSandbox/Sandbox.cpp b/Libraries/LibSandbox/Sandbox.cpp index 0dff64dcb5..f97aad8e66 100644 --- a/Libraries/LibSandbox/Sandbox.cpp +++ b/Libraries/LibSandbox/Sandbox.cpp @@ -504,14 +504,6 @@ ErrorOr restrict_filesystem_with_landlock(ReadonlySpan paths return {}; } - -ErrorOr restrict_filesystem_with_landlock(ReadonlySpan readable_paths) -{ - Vector paths; - for (auto readable_path : readable_paths) - TRY(paths.try_append({ readable_path.to_byte_string(), LandlockPath::Access::ReadOnly })); - return restrict_filesystem_with_landlock(paths.span()); -} #endif } diff --git a/Libraries/LibSandbox/Sandbox.h b/Libraries/LibSandbox/Sandbox.h index 26fefb4042..effe567895 100644 --- a/Libraries/LibSandbox/Sandbox.h +++ b/Libraries/LibSandbox/Sandbox.h @@ -52,8 +52,7 @@ enum class NetworkAccess { #if defined(AK_OS_LINUX) [[nodiscard]] ErrorOr add_landlock_path_if_exists(Vector& paths, StringView path, LandlockPath::Access); -[[nodiscard]] ErrorOr restrict_filesystem_with_landlock(ReadonlySpan); -[[nodiscard]] ErrorOr restrict_filesystem_with_landlock(ReadonlySpan readable_paths = {}); +[[nodiscard]] ErrorOr restrict_filesystem_with_landlock(ReadonlySpan = {}); #endif #if defined(AK_OS_MACOS)