bunpen: TODO: calculate uid/gid at runtime
This commit is contained in:
@@ -60,6 +60,7 @@ fn check_error(op: str, c: (void | fs::error | rt::errno)) void = {
|
|||||||
|
|
||||||
fn write_uid_map() void = {
|
fn write_uid_map() void = {
|
||||||
let uid_fd = rt::open("/proc/self/uid_map", rt::O_RDWR | rt::O_CLOEXEC, 0)!;
|
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])!;
|
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)!;
|
let setgroups_fd = rt::open("/proc/self/setgroups", rt::O_RDWR | rt::O_CLOEXEC, 0)!;
|
||||||
|
Reference in New Issue
Block a user