mirror of
https://github.com/fluencelabs/wasmer
synced 2025-07-01 01:21:32 +00:00
add more; get it working
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
use libc::{chroot as _chroot, printf as _printf};
|
||||
use libc::{chroot as _chroot, printf as _printf, getpwuid as _getpwuid};
|
||||
|
||||
use wasmer_runtime_core::vm::Ctx;
|
||||
|
||||
@ -22,3 +22,10 @@ pub fn chroot(ctx: &mut Ctx, name_ptr: i32) -> i32 {
|
||||
let name = emscripten_memory_pointer!(ctx.memory(0), name_ptr) as *const i8;
|
||||
unsafe { _chroot(name) }
|
||||
}
|
||||
|
||||
/// getpwuid
|
||||
pub fn getpwuid(_ctx: &mut Ctx, uid: i32) -> i32 {
|
||||
debug!("emscripten::getpwuid");
|
||||
// REVIEW: this seems wrong
|
||||
unsafe { _getpwuid(uid as u32) as _ }
|
||||
}
|
||||
|
Reference in New Issue
Block a user