diff options
-rw-r--r-- | src/loginrpc.cpp | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/src/loginrpc.cpp b/src/loginrpc.cpp index 09f6454..c13483f 100644 --- a/src/loginrpc.cpp +++ b/src/loginrpc.cpp @@ -119,7 +119,6 @@ void LoginRpc::handleCommandV1(const QString &command) allOutputs << virtOut; } } - /* Commented, to have a view on the client while debugging TODO REMOVE XXX // Either -1 if we didn't have a virtual one, or != 0 if xrandr setting failed if (ret != 0) { // Play it safe and disable all the outputs @@ -133,7 +132,6 @@ void LoginRpc::handleCommandV1(const QString &command) p.waitForFinished(2000); p.kill(); } - */ } } @@ -147,10 +145,11 @@ void LoginRpc::handleCommandV1(const QString &command) // Create edit.config if (file.open(QIODevice::ReadWrite)) { file.setPermissions(QFileDevice::ReadOwner | QFileDevice::WriteOwner | - QFileDevice::ExeOwner | QFileDevice::ReadUser | - QFileDevice::WriteUser | QFileDevice::ExeUser | - QFileDevice::ReadGroup | QFileDevice::ExeGroup | - QFileDevice::ReadOther | QFileDevice::ExeOther); + QFileDevice::ExeOwner | QFileDevice::ReadUser | + QFileDevice::WriteUser | QFileDevice::ExeUser | + QFileDevice::ReadGroup | QFileDevice::WriteGroup | + QFileDevice::ExeGroup | QFileDevice::ReadOther | + QFileDevice::WriteOther | QFileDevice::ExeOther); qDebug() << "edit.config created!"; QTextStream stream(&file); stream << "[Desktop Entry]" << endl; @@ -173,12 +172,18 @@ void LoginRpc::handleCommandV1(const QString &command) qDebug() << "Edit session ID was provided: " << lines[4]; QFile file("editsession.id"); - if (file.open(QIODevice::ReadWrite)) { + if (file.open(QIODevice::ReadWrite)) { + file.setPermissions(QFileDevice::ReadOwner | QFileDevice::WriteOwner | + QFileDevice::ExeOwner | QFileDevice::ReadUser | + QFileDevice::WriteUser | QFileDevice::ExeUser | + QFileDevice::ReadGroup | QFileDevice::WriteGroup | + QFileDevice::ExeGroup | QFileDevice::ReadOther | + QFileDevice::WriteOther | QFileDevice::ExeOther); qDebug() << "editsession.id file created!"; - QTextStream stream(&file); - stream << lines[4]; - file.close(); - } + QTextStream stream(&file); + stream << lines[4]; + file.close(); + } } emit loginRequest(lines[0], lines[1], lines[2]); |