Fixed the permission on the key files.

BUG=chromium:610727
TEST=local manual.

Change-Id: I112fd30383fae52bdc27be4b9b98aa5a7e0955ce
Previous-Reviewed-on: https://chromium-review.googlesource.com/398446
(cherry picked from commit df72ff4ba28dba4b1396e930f9731ac5cf1eeda6)
Reviewed-on: https://chromium-review.googlesource.com/400639
Trybot-Ready: Michael Tang <ntang@chromium.org>
Reviewed-by: Mohan Konduri <krk@chromium.org>
Reviewed-by: Simran Basi <sbasi@chromium.org>
Reviewed-by: Michael Tang <ntang@chromium.org>
Commit-Queue: Michael Tang <ntang@chromium.org>
Tested-by: Michael Tang <ntang@chromium.org>
diff --git a/project-moblab/chromeos-base/chromeos-bsp-moblab/chromeos-bsp-moblab-0.0.5-r41.ebuild b/project-moblab/chromeos-base/chromeos-bsp-moblab/chromeos-bsp-moblab-0.0.5-r42.ebuild
similarity index 100%
rename from project-moblab/chromeos-base/chromeos-bsp-moblab/chromeos-bsp-moblab-0.0.5-r41.ebuild
rename to project-moblab/chromeos-base/chromeos-bsp-moblab/chromeos-bsp-moblab-0.0.5-r42.ebuild
diff --git a/project-moblab/chromeos-base/chromeos-bsp-moblab/files/init/moblab-homedir-init.conf b/project-moblab/chromeos-base/chromeos-bsp-moblab/files/init/moblab-homedir-init.conf
index 4e9109a..ab63613 100644
--- a/project-moblab/chromeos-base/chromeos-bsp-moblab/files/init/moblab-homedir-init.conf
+++ b/project-moblab/chromeos-base/chromeos-bsp-moblab/files/init/moblab-homedir-init.conf
@@ -28,6 +28,12 @@
     # are copied from /usr/share instead.
     cp /usr/share/chromeos-ssh-config/keys/* "${MOBLAB_SSH_DIR}"
     chown -R moblab:moblab "${MOBLAB_SSH_DIR}"
+    if [ -e "${MOBLAB_SSH_DIR}"/id_rsa ]; then
+      chmod 600 ${MOBLAB_SSH_DIR}/id_rsa
+    fi
+    if [ -e "${MOBLAB_SSH_DIR}"/mobbase_id_rsa ]; then
+      chmod 600 ${MOBLAB_SSH_DIR}/mobbase_id_rsa
+    fi
   fi
 
   # Create a placeholder for the boto file.