gui: Call setupAppinfo() also for the IPC server

This commit is contained in:
Albert S. 2021-12-30 12:31:32 +01:00
bovenliggende 407ee1210c
commit c51487c4b2
2 gewijzigde bestanden met toevoegingen van 11 en 2 verwijderingen

Bestand weergeven

@ -27,13 +27,21 @@ static QMap<QString, Processor *> processors{
void SandboxedProcessor::enableSandbox(QString readablePath)
{
struct exile_policy *policy = exile_init_policy();
if(policy == NULL)
{
qCritical() << "Could not init exile";
exit(EXIT_FAILURE);
}
policy->namespace_options = EXILE_UNSHARE_NETWORK | EXILE_UNSHARE_USER;
if(!readablePath.isEmpty())
{
std::string readablePathLocation = readablePath.toStdString();
exile_append_path_policy(policy, EXILE_FS_ALLOW_ALL_READ, readablePathLocation.c_str());
if(exile_append_path_policy(policy, EXILE_FS_ALLOW_ALL_READ, readablePathLocation.c_str()) != 0)
{
qCritical() << "Failed to add path policies";
exit(EXIT_FAILURE);
}
}
else
{

Bestand weergeven

@ -16,6 +16,7 @@ int main(int argc, char *argv[])
QString socketPath = "/tmp/looqs-spawner";
if(argc > 1)
{
Common::setupAppInfo();
QApplication a(argc, argv);
QString arg = argv[1];
if(arg == "ipc")