pub fn check_passwordless_sudo_available() -> Result<bool, String>Expand description
What: Check if passwordless privilege escalation is available for the current user.
Inputs:
- None (uses the active privilege tool from settings).
Output:
Ok(true)if passwordless execution is available,Ok(false)if not, orErr(String)on error.
ยงErrors
- Returns
Errif the check cannot be executed (e.g., tool not installed).
Details:
- Delegates to
crate::logic::privilege::PrivilegeTool::check_passwordless. - Uses the resolved privilege tool (sudo or doas) based on settings.
- Both sudo and doas support
-n truefor non-interactive checking.