From bc6eba9f80f45141c1ea56f5ae2ca49df1e6366b Mon Sep 17 00:00:00 2001 From: Harry Stern Date: Thu, 4 Apr 2024 12:46:29 -0400 Subject: [PATCH] Update changelog and todo --- CHANGELOG.md | 7 +++++-- todo.txt | 32 +++----------------------------- 2 files changed, 8 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f332bc..93db010 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ -unreleased ----------- +0.5.0 +----- +- Add `Isolate` feature for using unprivileged namespaces + - Use `Isolate::run` inside your normal code to start the isolate + - Use `Isolate::main_hook` at the beginning of main to actually run the isolate upon re-exec - Add default implementation for `RuleSet::conditional_rules` - impl RuleSet for `syscalls::Sysno` for easier ad-hoc rulesets - Use generics instead of impl Trait in public functions to allow turbofish usage diff --git a/todo.txt b/todo.txt index 2af7496..6555870 100644 --- a/todo.txt +++ b/todo.txt @@ -1,34 +1,6 @@ # New functionality -## Other "sandboxing" features -https://chromium.googlesource.com/chromium/src.git/+/HEAD/docs/linux/sandboxing.md#User-namespaces-sandbox - -User namespaces option? Something like: - -rust -``` -SafetyContext::new() -.isolate_process() -``` - -using unshare maybe? https://docs.kernel.org/userspace-api/unshare.html unshare is a bit tricky because e.g. newpid doesn't actually unshare the current thread, only its children. so maybe it would be better with a wrapper around creating a thread like ctx.run below. - -Maybe even a macro similar to tokio::main? is something like - -``` -fn my_context() -> SafetyContext { -} - -#[extrasafe::main(my_context)] -fn main() { - foo(); - //... -} -``` - -possible? it should ideally also work transparently with tokio::main as well as long as you put it first - -see also https://blog.lizzie.io/linux-containers-in-500-loc.html +Linux capabilities for dropping privs inside Isolates ## custom landlock configurations? more than just file read/write path create/list/delete @@ -40,6 +12,8 @@ Something either like "Network::everything()" (rather than Network::nothing etc) # Nice to haves +- better way to run isolates in tests + - convenience function to enable ssl cert directories with landlock - convenience function to enable dns files/directories with landlock - update examples to use them