From 4a043a683e90f7dfb3eb238e8b2037601fe9d37d Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 2 May 2008 19:43:11 +0000 Subject: [PATCH] -Add server credential retrieval git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1258 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/lib/xcat/plugins/credentials.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/xCAT-server-2.0/lib/xcat/plugins/credentials.pm b/xCAT-server-2.0/lib/xcat/plugins/credentials.pm index 3cfb0a407..32f239125 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/credentials.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/credentials.pm @@ -107,7 +107,13 @@ sub process_request next; } $tfilename = "/root/.ssh/id_rsa"; - } elsif (/xcat_root_cred/) { + } elsif (/xcat_server_cred/) { + unless (-r "/etc/xcat/cert/server-cred.pem") { + push @{$rsp->{'error'}},"Unable to read root's private xCAT key"; + next; + } + $tfilename = "/etc/xcat/cert/server-cred.pem"; + } elsif (/xcat_client_cred/ or /xcat_root_cred/) { unless (-r "/root/.xcat/client-cred.pem") { push @{$rsp->{'error'}},"Unable to read root's private xCAT key"; next;