- Downloads
Implement capability free mode of operation
This commit implements oniux in a capability free fashion by utilizing the `user_namespaces(7)` feature to gain capabilities on further namespaces it "owns". With this, we can performed a privileged operation, such as the creation of TUN interfaces, without owning any capabilities. Many thanks to 7ppKb5bW for teaching on how this can be done, as well as for providing an initial prototype with this feature enabled.
Showing
- Cargo.lock 17 additions, 117 deletionsCargo.lock
- Cargo.toml 3 additions, 2 deletionsCargo.toml
- README.md 8 additions, 50 deletionsREADME.md
- src/main.rs 110 additions, 159 deletionssrc/main.rs
- src/netlink.rs 0 additions, 31 deletionssrc/netlink.rs
- src/user.rs 48 additions, 0 deletionssrc/user.rs
| ... | ... | @@ -9,12 +9,13 @@ anyhow = "1.0.95" |
| caps = "0.5.5" | ||
| clap = { version = "4.5.27", features = ["derive"] } | ||
| env_logger = "0.11.6" | ||
| ipc-channel = "0.19.0" | ||
| log = "0.4.25" | ||
| netlink-packet-core = "0.7.0" | ||
| netlink-packet-route = "0.22.0" | ||
| netlink-sys = "0.8.7" | ||
| nix = { version = "0.29.0", features = ["sched", "process", "fs", "mount"] } | ||
| nix = { version = "0.29.0", features = ["sched", "process", "fs", "mount", "user"] } | ||
| onion-tunnel = { git = "https://gitlab.torproject.org/tpo/core/onionmasq.git" } | ||
| sendfd = "0.4.4" | ||
| smoltcp = { git = "https://gitlab.torproject.org/tpo/core/smoltcp.git" } | ||
| tempfile = "3.19.1" | ||
| tokio = { version = "1.44.1", features = ["full"] } |
src/user.rs
0 → 100644
Please sign in to comment