Commit 4e83d167 authored by Christian Kandeler's avatar Christian Kandeler
Browse files

Maemo: Set more restrictive permissions for generated private keys.

For better compatibility with the OpenSSH client.
parent ad68bb23
......@@ -415,6 +415,8 @@ private:
enableInput();
return;
}
QFile::setPermissions(privateKeyFilePath(),
QFile::ReadOwner | QFile::WriteOwner);
m_ui->statusLabel->setText(m_ui->statusLabel->text() + tr("Done."));
m_isComplete = true;
......
......@@ -131,4 +131,6 @@ void MaemoSshConfigDialog::saveKey(bool publicKey)
: m_keyGenerator->privateKey());
if (saver.finalize(this) && !publicKey)
emit privateKeyGenerated(fileName);
if (!publicKey)
QFile::setPermissions(fileName, QFile::ReadOwner | QFile::WriteOwner);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment