mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-11-04 16:35:19 +00:00
workaround of issue #2756
This commit is contained in:
1 parent
c01dfc9af3
commit
e752c726ed
1 file changed
+6
-2
@@ -667,8 +667,12 @@ pub fn check_super_user_permission() -> ResultType<bool> {
|
||||
} else {
|
||||
arg = "echo";
|
||||
}
|
||||
let status = exec_privileged(&[arg])?.wait()?;
|
||||
Ok(status.success() && status.code() == Some(0))
|
||||
// https://github.com/rustdesk/rustdesk/issues/2756
|
||||
if let Ok(status) = Command::new("pkexec").arg(arg).status() {
|
||||
Ok(status.code() != Some(126))
|
||||
} else {
|
||||
Ok(true)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn elevate(args: Vec<&str>) -> ResultType<bool> {
|
||||
|
||||
Reference in new issue
Block a user