Skip to content
API Documentation
BastionGuard™
BastionApp Class Reference
Inheritance diagram for BastionApp:

Public Member Functions

 BastionApp ()
CefRefPtr< CefBrowserProcessHandler > GetBrowserProcessHandler () override
void OnBeforeCommandLineProcessing (const CefString &, CefRefPtr< CefCommandLine > cmd) override
void set_no_sandbox (bool v)
 IMPLEMENT_REFCOUNTING (BastionApp)

Private Attributes

bool no_sandbox_ = false

Detailed Description

Definition at line 795 of file bastionguard_cef.cpp.

Constructor & Destructor Documentation

◆ BastionApp()

BastionApp::BastionApp ( )
inline

Definition at line 797 of file bastionguard_cef.cpp.

static bool running_confined()

References no_sandbox_, and running_confined().

Referenced by IMPLEMENT_REFCOUNTING(), and main().

Member Function Documentation

◆ GetBrowserProcessHandler()

CefRefPtr< CefBrowserProcessHandler > BastionApp::GetBrowserProcessHandler ( )
inlineoverride

Definition at line 799 of file bastionguard_cef.cpp.

799 {
800 return this;
801 }

◆ IMPLEMENT_REFCOUNTING()

BastionApp::IMPLEMENT_REFCOUNTING ( BastionApp )

References BastionApp().

◆ OnBeforeCommandLineProcessing()

void BastionApp::OnBeforeCommandLineProcessing ( const CefString & ,
CefRefPtr< CefCommandLine > cmd )
inlineoverride

Definition at line 803 of file bastionguard_cef.cpp.

803 {
804 cmd->AppendSwitch("incognito");
805 cmd->AppendSwitch("disable-extensions");
806 cmd->AppendSwitch("no-first-run");
807 cmd->AppendSwitch("no-default-browser-check");
808 cmd->AppendSwitch("disable-gpu");
809 cmd->AppendSwitch("disable-gpu-compositing");
810 cmd->AppendSwitch("disable-software-rasterizer");
811 cmd->AppendSwitch("disable-gpu-process-crash-limit");
812 cmd->AppendSwitch("in-process-gpu");
813 cmd->AppendSwitch("disable-accelerated-2d-canvas");
814 cmd->AppendSwitch("disable-accelerated-video-decode");
815 cmd->AppendSwitch("disable-webgl");
816
817 // ANTI-CRASH IN SANDBOX: settings.no_sandbox copre il processo
818 // browser, ma i sottoprocessi (zygote, renderer, gpu, utility)
819 // leggono i flag dalla command line. In ambiente confinato dobbiamo
820 // propagare esplicitamente --no-sandbox a tutti, altrimenti la zygote
821 // tenta comunque clone(CLONE_NEWUSER) e aborta.
822 if (no_sandbox_) {
823 if (!cmd->HasSwitch("no-sandbox"))
824 cmd->AppendSwitch("no-sandbox");
825 if (!cmd->HasSwitch("disable-setuid-sandbox"))
826 cmd->AppendSwitch("disable-setuid-sandbox");
827 if (!cmd->HasSwitch("disable-namespace-sandbox"))
828 cmd->AppendSwitch("disable-namespace-sandbox");
829 }
830 }

References no_sandbox_.

◆ set_no_sandbox()

void BastionApp::set_no_sandbox ( bool v)
inline

Definition at line 835 of file bastionguard_cef.cpp.

835{ no_sandbox_ = v; }

References no_sandbox_.

Member Data Documentation

◆ no_sandbox_

bool BastionApp::no_sandbox_ = false
private

Definition at line 840 of file bastionguard_cef.cpp.

Referenced by BastionApp(), OnBeforeCommandLineProcessing(), and set_no_sandbox().


The documentation for this class was generated from the following file: