2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 03:32:04 +00:00

Merge pull request #7368 from peterwywong/kvm2

Reduce the VNC password from 20 characters to 8
This commit is contained in:
Mark Gurevich 2023-03-24 17:11:04 -04:00 committed by GitHub
commit 0cc33e25c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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');
}