configurable trans-membrance hostcall blocklist

This commit is contained in:
root
2026-06-16 01:13:06 +00:00
parent 52cf266a5e
commit f2a3503ac3
60 changed files with 1675 additions and 338 deletions
+38 -8
View File
@@ -25,7 +25,24 @@ int usleep(unsigned int usec);
#include <ctime>
#include <sstream>
struct DValue;
String shell_exec(String cmd);
DValue http_request(DValue req);
u64 http_request_async(DValue req);
DValue shell_exec(DValue spec);
u64 shell_spawn(DValue spec);
DValue job_status(u64 job_id);
DValue job_result(u64 job_id);
DValue job_await(u64 job_id, u64 timeout_ms);
bool job_cancel(u64 job_id);
String sha256(String data);
String sha256_hex(String data);
String hmac_sha256(String key, String data);
String hmac_sha256_hex(String key, String data);
String base64_decode(String raw);
String random_bytes(u64 n);
bool crypto_equal(String a, String b);
String shell_escape(String raw);
String basename(String fn);
String dirname(String fn);
@@ -34,20 +51,34 @@ String path_real(String path);
bool path_is_within(String path, String root);
bool mkdir(String path);
bool file_exists(String path);
int file_open_locked(String file_name, int open_flags, int lock_type = LOCK_SH, int create_mode = 0644, f64 wait_timeout_seconds = 3.0, String purpose = "");
void file_close_locked(int fd);
void file_release_process_locks(String reason = "");
String file_get_contents_locked_fd(int fd);
bool file_put_contents_locked_fd(int fd, String content);
String file_get_contents(String file_name);
bool file_put_contents(String file_name, String content);
bool file_append_contents(String file_name, String content);
bool file_append(String file_name, String content);
u64 file_open(String path, String mode);
String file_read(u64 h, u64 len);
String file_pread(u64 h, u64 offset, u64 len);
u64 file_write(u64 h, String data);
u64 file_pwrite(u64 h, u64 offset, String data);
s64 file_seek(u64 h, s64 offset, int whence);
s64 file_tell(u64 h);
void file_close(u64 h);
DValue file_stat(String path);
DValue dir_list(String path);
bool file_rename(String from, String to);
bool file_copy(String from, String to);
bool file_truncate(String path, u64 size);
bool dir_remove(String path, bool recursive = false);
String file_temp(String prefix);
bool file_chmod(String path, u32 mode);
bool file_symlink(String target, String linkpath);
String file_readlink(String path);
bool file_fsync(u64 h);
template <typename... Ts>
inline bool file_append(String file_name, Ts... args)
{
std::ostringstream out;
((out << args), ...);
return(file_append_contents(file_name, out.str()));
return(file_append(file_name, out.str()));
}
String cwd_get();
void cwd_set(String path);
@@ -61,7 +92,6 @@ u64 time();
String time_format_local(String format = "", u64 timestamp = 0);
// Runtime timing/profiling snapshot for the active wasm request/workspace.
struct DValue;
DValue request_perf();
String time_format_utc(String format = "", u64 timestamp = 0);