bunpen: TODO: calculate uid/gid at runtime

This commit is contained in:
2024-08-24 20:12:51 +00:00
parent 7d7abc9619
commit ccddc6f8e1

View File

@@ -60,6 +60,7 @@ fn check_error(op: str, c: (void | fs::error | rt::errno)) void = {
fn write_uid_map() void = {
let uid_fd = rt::open("/proc/self/uid_map", rt::O_RDWR | rt::O_CLOEXEC, 0)!;
// TODO: write the actual uid/gid here -- not hardcoded 1000/100
io::write(uid_fd, &['1': u8, '0', '0', '0', ' ', '1', '0', '0', '0', ' ', '1', '\n', 0])!;
let setgroups_fd = rt::open("/proc/self/setgroups", rt::O_RDWR | rt::O_CLOEXEC, 0)!;