mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-18 22:16:18 -05:00
Support HIP report (#309)
This commit is contained in:
1 parent
662e4d0b8a
commit
db9249bd61
12 files changed
+334
-2
No files matched your search
@@ -23,6 +23,11 @@ pub fn get_non_root_user() -> anyhow::Result<User> {
|
||||
Ok(user)
|
||||
}
|
||||
|
||||
pub fn get_current_user() -> anyhow::Result<User> {
|
||||
let current_user = whoami::username();
|
||||
get_user_by_name(¤t_user)
|
||||
}
|
||||
|
||||
fn get_real_user() -> anyhow::Result<User> {
|
||||
// Read the UID from SUDO_UID or PKEXEC_UID environment variable if available.
|
||||
let uid = match env::var("SUDO_UID") {
|
||||
|
||||
Reference in new issue
Block a user