From 8acd9a7f0dfe171ce634ecd91a97426ab8eb59c0 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Mon, 22 Mar 2010 13:18:34 +0000 Subject: [PATCH] -Fix missing MIME requirement -Strip newline from base64 encoding git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5543 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/dns.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/dns.pm b/xCAT-server/lib/xcat/plugins/dns.pm index ee58e6eca..bd5ef1a19 100644 --- a/xCAT-server/lib/xcat/plugins/dns.pm +++ b/xCAT-server/lib/xcat/plugins/dns.pm @@ -4,6 +4,7 @@ use Getopt::Long; use Net::DNS; use xCAT::Table; use Sys::Hostname; +use MIME::Base64; use Socket; use Fcntl qw/:flock/; #This is a rewrite of DNS management using nsupdate rather than direct zone mangling @@ -424,6 +425,7 @@ sub update_namedconf { unless ($gotkey) { unless ($ctx->{privkey}) { #need to generate one $ctx->{privkey} = encode_base64(genpassword(32)); + chomp($ctx->{privkey}); } push @newnamed,"key xcat_key {\n","\talgorithm hmac-md5;\n","\tsecret \"".$ctx->{privkey}."\";\n","};\n\n"; $ctx->{restartneeded}=1;