#[non_exhaustive]pub enum SandboxPolicy {
Auto,
Required,
Disabled,
}Expand description
What to do with Chromium’s process sandbox.
Defaults to SandboxPolicy::Auto, which keeps the sandbox wherever the runtime can.
§Windows does not have a sandbox here yet
Whatever this policy says, a Windows build currently runs unsandboxed. CEF wants a
sandbox broker pointer that, since Chromium M138, only a binary built with Chromium’s
own toolchain can create; CEF supplies prebuilt bootstrap.exe hosts for that, and
they load the application as a DLL, which a Tauri application is not. Given a null
broker CEF sets no_sandbox itself, so there is no configuration here that changes
the outcome — only whether the runtime warns about it (Self::Auto) or refuses to
start (Self::Required).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Auto
Keep the sandbox wherever it can be kept, and log a warning naming the reason wherever it cannot.
It cannot be kept in two situations: on Windows, always, for the reason above; and
on Linux or BSD when the application runs from an AppImage on a system that has
neither the setuid chrome-sandbox helper nor usable unprivileged user namespaces,
where the alternative is not an unsandboxed application but no application at all,
since Chromium aborts with “No usable sandbox!”.
macOS always keeps it.
Required
Never run without a sandbox: fail startup instead.
Pick this when running unsandboxed is not an acceptable outcome and a hard failure
is preferable. On Linux the user can then install the setuid helper, point
CHROME_DEVEL_SANDBOX at one, or re-enable unprivileged user namespaces; on Windows
there is nothing they can do, so this always fails there.
Disabled
Always run without a sandbox, on every platform.
Every renderer then runs with the full privileges of the user, so a compromised renderer is a compromised account. Useful for containers and CI images that cannot provide a sandbox, not for shipped applications.
Trait Implementations§
Source§impl Clone for SandboxPolicy
impl Clone for SandboxPolicy
impl Copy for SandboxPolicy
Source§impl Debug for SandboxPolicy
impl Debug for SandboxPolicy
Source§impl Default for SandboxPolicy
impl Default for SandboxPolicy
impl Eq for SandboxPolicy
Source§impl PartialEq for SandboxPolicy
impl PartialEq for SandboxPolicy
impl StructuralPartialEq for SandboxPolicy
Auto Trait Implementations§
impl Freeze for SandboxPolicy
impl RefUnwindSafe for SandboxPolicy
impl Send for SandboxPolicy
impl Sync for SandboxPolicy
impl Unpin for SandboxPolicy
impl UnsafeUnpin for SandboxPolicy
impl UnwindSafe for SandboxPolicy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, U> ConvertReturnValue<U> for Twhere
T: Into<U>,
impl<T, U> ConvertReturnValue<U> for Twhere
T: Into<U>,
fn wrap_result(self) -> U
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.