From 1a751e3379ae3bfbf1fcbe877174c428d4315ff4 Mon Sep 17 00:00:00 2001 From: Wai Yee Wong Date: Fri, 24 Mar 2023 16:58:00 -0400 Subject: [PATCH] Reduce the VNC password from 20 characters to 8 --- xCAT-server/lib/xcat/plugins/kvm.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/kvm.pm b/xCAT-server/lib/xcat/plugins/kvm.pm index 08b43df07..a7ae8944e 100755 --- a/xCAT-server/lib/xcat/plugins/kvm.pm +++ b/xCAT-server/lib/xcat/plugins/kvm.pm @@ -962,7 +962,7 @@ sub build_xmldesc { if ($confdata->{vm}->{$node}->[0]->{vidpassword}) { $xtree{devices}->{graphics}->{password} = $confdata->{vm}->{$node}->[0]->{vidpassword}; } else { - $xtree{devices}->{graphics}->{password} = genpassword(20); + $xtree{devices}->{graphics}->{password} = genpassword(8); } if (defined($hypcpumodel) and $hypcpumodel eq 'ppc64') { $xtree{devices}->{emulator}->{content} = "/usr/bin/qemu-system-ppc64"; @@ -1469,7 +1469,7 @@ sub makedom { if ($confdata->{vm}->{$node}->[0]->{vidpassword}) { $graphics->setAttribute("passwd", $confdata->{vm}->{$node}->[0]->{vidpassword}); } else { - $graphics->setAttribute("passwd", genpassword(20)); + $graphics->setAttribute("passwd", genpassword(8)); } $graphics->setAttribute("listen", '0.0.0.0'); }