mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-18 22:16:18 -05:00
feat: install trusted VPN scripts
This commit is contained in:
23 files changed
+454
-11
No files matched your search
@@ -0,0 +1,3 @@
|
||||
pub(crate) fn trusted_csd_uid() -> anyhow::Result<Option<u32>> {
|
||||
Ok(None)
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "openbsd"))]
|
||||
#[path = "privileged_unix.rs"]
|
||||
mod platform;
|
||||
#[cfg(not(any(target_os = "linux", target_os = "freebsd", target_os = "openbsd")))]
|
||||
#[path = "default.rs"]
|
||||
mod platform;
|
||||
|
||||
pub(crate) use platform::trusted_csd_uid;
|
||||
@@ -0,0 +1,7 @@
|
||||
pub(crate) fn trusted_csd_uid() -> anyhow::Result<Option<u32>> {
|
||||
let uid = gpapi::process::users::get_non_root_user()?.uid();
|
||||
if uid == 0 {
|
||||
anyhow::bail!("The HIP script user must not be root");
|
||||
}
|
||||
Ok(Some(uid))
|
||||
}
|
||||
Reference in new issue
Block a user