shell-rs 0.2.6

Rust reimplementation of common coreutils APIs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Copyright (c) 2021 Xu Shaohua <shaohua@biofan.org>. All rights reserved.
// Use of this source is governed by Apache-2.0 License that can be found
// in the LICENSE file.

use super::error::Error;

fn get_username() -> Result<String, Error> {
    let _uid = unsafe { nc::geteuid() };
    Ok(String::new())
}

#[inline]
pub fn whoami() -> Result<String, Error> {
    get_username()
}