forked from qt-creator/qt-creator
Maemo: Set more restrictive permissions for generated private keys.
For better compatibility with the OpenSSH client.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user