gui: Call setupAppinfo() also for the IPC server
This commit is contained in:
parent
407ee1210c
commit
c51487c4b2
@ -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
|
||||
{
|
||||
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user