Skip to content

Commit 3d01652

Browse files
committed
Visibility change
1 parent d3775d8 commit 3d01652

4 files changed

Lines changed: 14 additions & 14 deletions

File tree

src-tauri/src/enterprise/inspector/linux.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ fn check_luks() -> Result<bool, UnavailableReason> {
6363

6464
// https://labex.io/tutorials/linux-how-to-check-if-disk-encryption-is-enabled-in-linux-558786
6565
// FIXME: This will check all available disks, so if any is encrypted, it will succeed.
66-
pub(crate) fn disk_encryption_status() -> Result<bool, UnavailableReason> {
66+
pub(super) fn disk_encryption_status() -> Result<bool, UnavailableReason> {
6767
// TODO: zfs encryption
6868
check_luks()
6969
}

src-tauri/src/enterprise/inspector/macos.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::process::Command;
33
use super::UnavailableReason;
44

55
/// Check if FileVault has been enabled.
6-
pub(crate) fn disk_encryption_status() -> Result<bool, UnavailableReason> {
6+
pub(super) fn disk_encryption_status() -> Result<bool, UnavailableReason> {
77
let output = Command::new("fdesetup")
88
.arg("isactive")
99
.output()
@@ -14,7 +14,7 @@ pub(crate) fn disk_encryption_status() -> Result<bool, UnavailableReason> {
1414
}
1515

1616
/// Check if System Integrity Protection has been enabled.
17-
pub(crate) fn system_integrity_status() -> Result<bool, UnavailableReason> {
17+
pub(super) fn system_integrity_status() -> Result<bool, UnavailableReason> {
1818
let output = Command::new("csrutil")
1919
.arg("status")
2020
.output()

src-tauri/src/enterprise/inspector/mod.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,22 +82,22 @@ impl OsType {
8282

8383
/// Returns the operating system type.
8484
#[must_use]
85-
pub fn os_type() -> OsType {
85+
fn os_type() -> OsType {
8686
OsType::this_machine()
8787
}
8888

8989
/// Returns the operating system name.
90-
pub fn os_name() -> Result<String, UnavailableReason> {
90+
fn os_name() -> Result<String, UnavailableReason> {
9191
System::name().ok_or(UnavailableReason::DetectionFailed)
9292
}
9393

9494
/// Returns the operating system version.
95-
pub fn os_version() -> Result<String, UnavailableReason> {
95+
fn os_version() -> Result<String, UnavailableReason> {
9696
System::os_version().ok_or(UnavailableReason::DetectionFailed)
9797
}
9898

9999
/// Returns the Linux kernel version.
100-
pub fn linux_kernel_version() -> Result<String, UnavailableReason> {
100+
fn linux_kernel_version() -> Result<String, UnavailableReason> {
101101
#[cfg(target_os = "linux")]
102102
{
103103
System::kernel_version().ok_or_else(|| UnavailableReason::DetectionFailed)
@@ -110,7 +110,7 @@ pub fn linux_kernel_version() -> Result<String, UnavailableReason> {
110110
}
111111

112112
/// Returns the disk encryption status, preferably for the system volume.
113-
pub fn disk_encryption_status() -> Result<bool, UnavailableReason> {
113+
fn disk_encryption_status() -> Result<bool, UnavailableReason> {
114114
#[cfg(target_os = "macos")]
115115
{
116116
macos::disk_encryption_status()
@@ -128,7 +128,7 @@ pub fn disk_encryption_status() -> Result<bool, UnavailableReason> {
128128
}
129129

130130
/// Returns the antivirus status.
131-
pub fn anti_virus_status() -> Result<bool, UnavailableReason> {
131+
fn anti_virus_status() -> Result<bool, UnavailableReason> {
132132
#[cfg(windows)]
133133
{
134134
windows::anti_virus_status()
@@ -141,7 +141,7 @@ pub fn anti_virus_status() -> Result<bool, UnavailableReason> {
141141
}
142142

143143
/// Checks whether the computer is part of a domain.
144-
pub fn part_of_domain() -> Result<bool, UnavailableReason> {
144+
fn part_of_domain() -> Result<bool, UnavailableReason> {
145145
#[cfg(windows)]
146146
{
147147
windows::part_of_domain()

src-tauri/src/enterprise/inspector/windows.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ fn system_drive_letter() -> Result<String, UnavailableReason> {
8282
///
8383
/// Equivalent to PowerShell command:
8484
/// `Get-WmiObject -Namespace "root\CIMV2\Security\MicrosoftVolumeEncryption" -query "SELECT * FROM Win32_EncryptableVolume"`
85-
pub(crate) fn disk_encryption_status() -> Result<bool, UnavailableReason> {
85+
pub(super) fn disk_encryption_status() -> Result<bool, UnavailableReason> {
8686
let drive_letter = system_drive_letter()?;
8787

8888
let conn =
@@ -114,7 +114,7 @@ pub(crate) fn disk_encryption_status() -> Result<bool, UnavailableReason> {
114114
///
115115
/// Equivalent to PowerShell command:
116116
/// `Get-WmiObject -Namespace "root\SecurityCenter2" -query "SELECT * FROM AntiVirusProduct"`
117-
pub(crate) fn anti_virus_status() -> Result<bool, UnavailableReason> {
117+
pub(super) fn anti_virus_status() -> Result<bool, UnavailableReason> {
118118
let conn = WMIConnection::with_namespace_path("root\\SecurityCenter2")?;
119119
let products: Vec<AntiVirusProduct> = conn.query()?;
120120
for product in products {
@@ -136,7 +136,7 @@ pub(crate) fn anti_virus_status() -> Result<bool, UnavailableReason> {
136136
///
137137
/// Equivalent to PowerShell command:
138138
/// `Get-WmiObject -query "SELECT * FROM Win32_ComputerSystem"`
139-
pub(crate) fn part_of_domain() -> Result<bool, UnavailableReason> {
139+
pub(super) fn part_of_domain() -> Result<bool, UnavailableReason> {
140140
let conn = WMIConnection::new()?;
141141
let system = conn.get::<Win32ComputerSystem>()?;
142142
Ok(system.part_of_domain)
@@ -149,7 +149,7 @@ pub(crate) fn part_of_domain() -> Result<bool, UnavailableReason> {
149149
///
150150
/// Equivalent to PowerShell command:
151151
/// `Get-WmiObject -query "SELECT * FROM Win32_QuickFixEngineering"`
152-
pub(crate) fn security_update_status() -> Result<bool, UnavailableReason> {
152+
pub(super) fn security_update_status() -> Result<bool, UnavailableReason> {
153153
let conn = WMIConnection::new()?;
154154
let fixes: Vec<Win32QuickFixEngineering> = conn.query().unwrap();
155155

0 commit comments

Comments
 (0)