Bug 760898

Summary: kvm should disable to change vnc password after removing vnc password option
Product: Red Hat Enterprise Linux 7 Reporter: FuXiangChun <xfu>
Component: qemu-kvm-rhevAssignee: Gerd Hoffmann <kraxel>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 7.0CC: areis, bsarathy, gyue, huding, juzhang, knoel, mazhang, michen, mkenneth, rbalakri, tburke, virt-maint
Target Milestone: rc   
Target Release: 7.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: qemu 2.1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 09:41:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description FuXiangChun 2011-12-07 10:04:44 UTC
+++ This bug was initially created as a clone of Bug #760881 +++

Description of problem:
boot guest with -vnc :1 option, but kvm can still change vnc password. if use vncview to connect guest, vnc password is invalid.

Version-Release number of selected component (if applicable):
# rpm -qa|grep kvm
kvm-83-246.el5
# uname -r
2.6.18-300.el5

How reproducible:
always

Steps to Reproduce:
1./usr/libexec/qemu-kvm  -M rhel5.6.0 -m 4096 -smp
4,cores=2,threads=1,sockets=2 -cpu qemu64,vendor="AuthenticAMD",+sse2 -soundhw
all -name win7 -usbdevice tablet -rtc-td-hack -uuid
123465d2-2032-848d-bda0-de7adb149048 -boot c -drive
file=/home/rhel6.2.z-64.qcow2,if=virtio,boot=on,bus=0,unit=0,format=qcow2,cache=none,boot=on,werror=stop
-net nic,macaddr=54:52:00:27:12:23,vlan=0,model=virtio -net
tap,vlan=0,script=/etc/qemu-ifup -serial pty -parallel none -usb -balloon none
-monitor stdio -vnc :1

2.set any password
(qemu) change vnc password

3.use vncview to connect des guest 
  vncviewer 10.66.9.97:5901
  
Actual results:
vncview don't need password 

Expected results:
kvm disable to change vnc password

Additional info:

Comment 1 Gerd Hoffmann 2011-12-12 10:03:35 UTC
So you expect the change password command (step #2) fail because password authentication isn't enabled.  Correct?

Comment 2 FuXiangChun 2012-01-06 02:25:45 UTC
(In reply to comment #1)
> So you expect the change password command (step #2) fail because password
> authentication isn't enabled.  Correct?

yes, i think so.

Comment 7 Gerd Hoffmann 2013-12-11 16:42:46 UTC
http://patchwork.ozlabs.org/patch/300213/

Comment 11 huiqingding 2014-08-04 06:32:36 UTC
Reproduce this bug using the following version:
qemu-kvm-rhev-2.0.0-3.el7ev.x86_64
kernel-3.10.0-140.el7.x86_64

Steps to Reproduce:
1. boot a guest with "-vnc :1"
# /usr/libexec/qemu-kvm  -M pc -m 4096 -smp ,cores=2,threads=1,sockets=2 -cpu SandyBridge  -name rhel7 -usbdevice tablet  -drive file=/mnt/rhel7-64-ga.qcow2,if=virtio,boot=on,bus=0,unit=0,format=qcow2,cache=none,boot=on,werror=stop -net none -monitor stdio -vnc :1

2.set any password
(qemu) change vnc password

3.use remote-viewer to connect des guest 
# remote-viewer 10.66.9.97:5901

Results:
after step2, the password can be set.
after step3, need to input the password which is set.

Comment 12 huiqingding 2014-08-04 06:34:46 UTC
Test this bug on an intel host using the following version:
qemu-kvm-rhev-2.1.0-3.el7ev.preview.x86_64
kernel-3.10.0-140.el7.x86_64

Steps to Test:
1. boot a guest with "-vnc :1"
# /usr/libexec/qemu-kvm  -M pc -m 4096 -smp ,cores=2,threads=1,sockets=2 -cpu SandyBridge  -name rhel7 -usbdevice tablet  -drive file=/mnt/rhel7-64-ga.qcow2,if=virtio,boot=on,bus=0,unit=0,format=qcow2,cache=none,boot=on,werror=stop -net none -monitor stdio -vnc :1

2.set any password
(qemu) change vnc password

3.use remote-viewer to connect des guest 
# remote-viewer 10.66.9.97:5901

Results:
after step2, the password cannot be set as following info:
(qemu) change vnc password
Password: ******
If you want use passwords please enable password auth using '-vnc ${dpy},password'.(qemu) 

after step3, do not need to input any password.

Comment 13 huiqingding 2014-08-04 06:43:17 UTC
Test this bug on an amd host using the following version:
qemu-kvm-rhev-2.1.0-3.el7ev.preview.x86_64
kernel-3.10.0-140.el7.x86_64

Steps to Test:
1. boot a guest with "-vnc :1"
# /usr/libexec/qemu-kvm  -M pc -m 4096 -smp ,cores=2,threads=1,sockets=2 -cpu SandyBridge  -name rhel7 -usbdevice tablet  -drive file=/mnt/rhel7-64-ga.qcow2,if=virtio,boot=on,bus=0,unit=0,format=qcow2,cache=none,boot=on,werror=stop -net none -monitor stdio -vnc :1

2.set any password
(qemu) change vnc password

3.use remote-viewer to connect des guest 
# remote-viewer 10.66.9.97:5901

Results:
after step2, the password cannot be set as following info:
(qemu) change vnc password
Password: ******
If you want use passwords please enable password auth using '-vnc ${dpy},password'.(qemu) 

after step3, do not need to input any password.

Comment 15 huiqingding 2014-08-26 04:49:23 UTC
Test this bug on an amd host using the following version:
qemu-kvm-rhev-2.1.0-2.el7.x86_64
kernel-3.10.0-145.el7.x86_64

Steps to Test:
1. boot a guest with "-vnc :1"
# /usr/libexec/qemu-kvm  -M pc -m 4096 -smp ,cores=2,threads=1,sockets=2 -cpu Opteron_G5  -name rhel7 -usbdevice tablet  -drive file=/mnt/rhel7-64-ga.qcow2,if=virtio,boot=on,bus=0,unit=0,format=qcow2,cache=none,boot=on,werror=stop -net none -monitor stdio -vnc :1

2.set any password
(qemu) change vnc password

3.use remote-viewer to connect des guest 
# vncviewer 10.66.9.97:5901

Results:
after step2, the password cannot be set as following info:
(qemu) change vnc password
Password: ******
If you want use passwords please enable password auth using '-vnc ${dpy},password'.(qemu) 

after step3, do not need to input any password.

Comment 16 huiqingding 2014-08-26 04:52:49 UTC
Test this bug on an intel host using the following version:
qemu-kvm-rhev-2.1.0-2.el7.x86_64
kernel-3.10.0-145.el7.x86_64

Steps to Test:
1. boot a guest with "-vnc :1"
# /usr/libexec/qemu-kvm  -M pc -m 4096 -smp 4,cores=2,threads=1,sockets=2 -cpu SandyBridge  -name rhel7 -usbdevice tablet  -drive file=/mnt/rhel7-64-ga.qcow2,if=virtio,boot=on,bus=0,unit=0,format=qcow2,cache=none,boot=on,werror=stop -net none -monitor stdio -vnc :1

2.set any password
(qemu) change vnc password

3.use remote-viewer to connect des guest 
# vncviewer 10.66.9.97:5901

Results:
after step2, the password cannot be set as following info:
(qemu) change vnc password
Password: ******
If you want use passwords please enable password auth using '-vnc ${dpy},password'.(qemu) 

after step3, do not need to input any password.

Comment 17 huiqingding 2014-08-26 05:04:39 UTC
Based on the result of comment 15 and comment 16, I think this bug has been fixed.

Comment 20 errata-xmlrpc 2015-03-05 09:41:06 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-0624.html