From 420e86d35553fb5b424156b1daf166dd1245f638 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Mon, 25 Feb 2008 19:47:41 +0000 Subject: [PATCH] Fix permissions on host keys in image git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@568 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/lib/xcat/plugins/mknb.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/xCAT-server-2.0/lib/xcat/plugins/mknb.pm b/xCAT-server-2.0/lib/xcat/plugins/mknb.pm index 6fdd375d5..b5628b311 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/mknb.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/mknb.pm @@ -73,6 +73,7 @@ sub process_request { copy("$installdir/postscripts/hostkeys/ssh_host_key","$tempdir/etc/ssh_host_key"); copy("$installdir/postscripts/hostkeys/ssh_host_rsa_key","$tempdir/etc/ssh_host_rsa_key"); copy("$installdir/postscripts/hostkeys/ssh_host_dsa_key","$tempdir/etc/ssh_host_dsa_key"); + chmod(0600,<$tempdir/etc/ssh_*>); } unless (-r "$tempdir/etc/ssh_host_key") { system("ssh-keygen -t rsa1 -f $tempdir/etc/ssh_host_key -C '' -N ''");