OSDN Git Service

Maemo: Fix permissions of authorized_keys on device.
authorChristian Kandeler <christian.kandeler@nokia.com>
Tue, 1 Feb 2011 15:58:27 +0000 (16:58 +0100)
committerChristian Kandeler <christian.kandeler@nokia.com>
Wed, 2 Feb 2011 16:54:22 +0000 (17:54 +0100)
On Meego, this file is world-readable by default.

src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigurationssettingswidget.cpp

index 3f5e4c0..5ffc00f 100644 (file)
@@ -407,7 +407,7 @@ void MaemoDeviceConfigurationsSettingsWidget::deployKey()
         SLOT(handleKeyUploadFinished(int)));
     const QByteArray command = "test -d .ssh "
         "|| mkdir .ssh && chmod 0700 .ssh && echo '"
-        + key + "' >> .ssh/authorized_keys";
+        + key + "' >> .ssh/authorized_keys && chmod 0700 .ssh/authorized_keys";
     m_keyDeployer->run(command);
 }