Bug 695378

Summary: virt-manager should strip white chars from user input
Product: Red Hat Enterprise Linux 6 Reporter: Karel Srot <ksrot>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 6.1CC: dyuan, mzhan, zpeng
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
No description necessary
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 16:07:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Karel Srot 2011-04-11 14:23:41 UTC
Description of problem:

Security section in VM Overview window. Choose static labeling and enter a label with a space character at the end, e.g.
"system_u:system_r:svirt_t:s0:c333,c666 ". This happens very often e.g. during copy&paste.

Choose apply, observe the error:
Error changing VM configuration: XML description for Invalid security label system_u:system_r:svirt_t:s0:c333,c666 is not well formed or invalid.

Version-Release number of selected component (if applicable):
virt-manager-0.8.6-3.el6.noarch

How reproducible:
always

Steps to Reproduce:
1. see above

Actual results:
Error

Expected results:
virt-manager strip white characters from the input and therefore the context is accepted.

Additional info:

Comment 2 Cole Robinson 2011-07-28 15:29:48 UTC
Fixed in virt-manager-0.9.0-2.el6

Comment 4 zhe peng 2011-08-05 07:15:28 UTC
this bug can reproduce with:
virt-manager-0.8.6-4.el6

verify with:
virt-manager-0.9.0-5.el6
python-virtinst-0.600.0-2.el6
libvirt-0.9.4-1.el6
qemu-kvm-0.12.1.2-2.172.el6

step:
   1:goto Security section in VM Overview window. Choose static labeling and enter a label with a space character at the end, e.g.
"system_u:system_r:svirt_t:s0:c460,c779    " or
"  system_u:system_r:svirt_t:s0:c460,c779 "and click "apply"
virt-manager can strip white chars ,and no error occur.so the bug fixed.

Verification passed.

Comment 5 Cole Robinson 2011-11-07 16:38:19 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No description necessary

Comment 6 errata-xmlrpc 2011-12-06 16:07:48 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.

http://rhn.redhat.com/errata/RHBA-2011-1642.html