mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-12-04 15:46:07 +00:00
refact: Remove unused selinux check
The helper card that called it was removed in #17197. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JAxkkkfvhEPKVg85ZHovfs
This commit is contained in:
1 parent
cc3300d1bb
commit
51f94394ce
3 files changed
-33
No files matched your search
@@ -1749,10 +1749,6 @@ class RustdeskImpl {
|
||||
return versionToNumber(v: version) > versionToNumber(v: '1.2.4');
|
||||
}
|
||||
|
||||
bool isSelinuxEnforcing({dynamic hint}) {
|
||||
return false;
|
||||
}
|
||||
|
||||
String mainDefaultPrivacyModeImpl({dynamic hint}) {
|
||||
throw UnimplementedError("mainDefaultPrivacyModeImpl");
|
||||
}
|
||||
|
||||
@@ -2616,17 +2616,6 @@ pub fn is_support_multi_ui_session(version: String) -> SyncReturn<bool> {
|
||||
SyncReturn(crate::common::is_support_multi_ui_session(&version))
|
||||
}
|
||||
|
||||
pub fn is_selinux_enforcing() -> SyncReturn<bool> {
|
||||
#[cfg(target_os = "linux")]
|
||||
{
|
||||
SyncReturn(crate::platform::linux::is_selinux_enforcing())
|
||||
}
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
{
|
||||
SyncReturn(false)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn main_default_privacy_mode_impl() -> SyncReturn<String> {
|
||||
SyncReturn(crate::privacy_mode::DEFAULT_PRIVACY_MODE_IMPL.to_owned())
|
||||
}
|
||||
|
||||
@@ -3255,24 +3255,6 @@ pub fn is_x11() -> bool {
|
||||
*IS_X11
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn is_selinux_enforcing() -> bool {
|
||||
match run_cmds("getenforce") {
|
||||
Ok(output) => output.trim() == "Enforcing",
|
||||
Err(_) => match run_cmds("sestatus") {
|
||||
Ok(output) => {
|
||||
for line in output.lines() {
|
||||
if line.contains("Current mode:") {
|
||||
return line.contains("enforcing");
|
||||
}
|
||||
}
|
||||
false
|
||||
}
|
||||
Err(_) => false,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/// Get the app ID for shortcuts inhibitor permission.
|
||||
/// Returns different ID based on whether running in Flatpak or native.
|
||||
/// The ID must match the installed .desktop filename, as GNOME Shell's
|
||||
|
||||
Reference in new issue
Block a user