shared: SandboxedProcessor: Return proper exit code for failures
Bu işleme şunda yer alıyor:
ebeveyn
877fb3b61a
işleme
c74ef48b40
@ -36,7 +36,7 @@ void SandboxedProcessor::enableSandbox(QString readablePath)
|
|||||||
if(policy == NULL)
|
if(policy == NULL)
|
||||||
{
|
{
|
||||||
qCritical() << "Could not init exile" << Qt::endl;
|
qCritical() << "Could not init exile" << Qt::endl;
|
||||||
exit(EXIT_FAILURE);
|
exit(PROCESSFAIL);
|
||||||
}
|
}
|
||||||
policy->namespace_options = EXILE_UNSHARE_NETWORK | EXILE_UNSHARE_USER;
|
policy->namespace_options = EXILE_UNSHARE_NETWORK | EXILE_UNSHARE_USER;
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ void SandboxedProcessor::enableSandbox(QString readablePath)
|
|||||||
if(exile_append_path_policies(policy, EXILE_FS_ALLOW_ALL_READ, readablePathLocation.c_str()) != 0)
|
if(exile_append_path_policies(policy, EXILE_FS_ALLOW_ALL_READ, readablePathLocation.c_str()) != 0)
|
||||||
{
|
{
|
||||||
qCritical() << "Failed to add path policies";
|
qCritical() << "Failed to add path policies";
|
||||||
exit(EXIT_FAILURE);
|
exit(PROCESSFAIL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -60,7 +60,7 @@ void SandboxedProcessor::enableSandbox(QString readablePath)
|
|||||||
if(ret != 0)
|
if(ret != 0)
|
||||||
{
|
{
|
||||||
qCritical() << "Failed to establish sandbox: " << ret;
|
qCritical() << "Failed to establish sandbox: " << ret;
|
||||||
exit(EXIT_FAILURE);
|
exit(PROCESSFAIL);
|
||||||
}
|
}
|
||||||
exile_free_policy(policy);
|
exile_free_policy(policy);
|
||||||
}
|
}
|
||||||
|
Yükleniyor…
Yeni konuda referans
Bir kullanıcı engelle