gui: Remove enableSandbox() for general GUI
While f67a37bc21
indicated the last remaining code could stay,
it can't because there is a launch failure of SandboxedProcessor.
This has been revealed by the changes of the previous commit,
aa03d0a4920e.
Hence, the GUI will be untouched by exile. We only sandbox
the preview generation and the indexing trough IPC.
This commit is contained in:
父節點
e715be9787
當前提交
40207c3399
28
gui/main.cpp
28
gui/main.cpp
@ -15,25 +15,6 @@
|
||||
#include "../submodules/exile.h/exile.h"
|
||||
#include "ipcserver.h"
|
||||
|
||||
void enableSandbox()
|
||||
{
|
||||
struct exile_policy *policy = exile_create_policy();
|
||||
if(policy == NULL)
|
||||
{
|
||||
qCritical() << "Failed to init policy for sandbox";
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
policy->namespace_options = 0;
|
||||
policy->no_new_privs = 1;
|
||||
int ret = exile_enable_policy(policy);
|
||||
if(ret != 0)
|
||||
{
|
||||
qDebug() << "Failed to establish sandbox";
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
exile_free_policy(policy);
|
||||
}
|
||||
|
||||
void enableIpcSandbox()
|
||||
{
|
||||
struct exile_policy *policy = exile_create_policy();
|
||||
@ -139,15 +120,6 @@ int main(int argc, char *argv[])
|
||||
try
|
||||
{
|
||||
Common::ensureConfigured();
|
||||
if(!parser.isSet("no-sandbox"))
|
||||
{
|
||||
enableSandbox();
|
||||
qInfo() << "Sandbox: on";
|
||||
}
|
||||
else
|
||||
{
|
||||
qInfo() << "Sandbox: off";
|
||||
}
|
||||
}
|
||||
catch(LooqsGeneralException &e)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user