mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-23 09:23:25 +00:00
11 lines
288 B
Rust
11 lines
288 B
Rust
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
use super::SyscallReturn;
|
|
use crate::{prelude::*, process::Uid};
|
|
|
|
pub fn sys_geteuid(ctx: &Context) -> Result<SyscallReturn> {
|
|
let euid = ctx.posix_thread.credentials().euid();
|
|
|
|
Ok(SyscallReturn::Return(<Uid as Into<u32>>::into(euid) as _))
|
|
}
|