Bug 731742
| Summary: | libguestfs should escape special/non-printing characters in debug output | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Richard W.M. Jones <rjones> | |
| Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> | |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | |
| Severity: | unspecified | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | 6.1 | CC: | jzheng, leiwang, qwan | |
| Target Milestone: | rc | |||
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | libguestfs-1.16.2-1.el6 | Doc Type: | Bug Fix | |
| Doc Text: |
No Documentation needed
|
Story Points: | --- | |
| Clone Of: | ||||
| : | 731744 (view as bug list) | Environment: | ||
| Last Closed: | 2012-06-20 06:59: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: | ||
| Embargoed: | ||||
| Bug Depends On: | 719879, 731744 | |||
| Bug Blocks: | ||||
|
Description
Richard W.M. Jones
2011-08-18 14:24:50 UTC
Upstream commit is 06019bc82e107f7715ebc59e491610e06dad1e39.
This is pretty easy to test:
guestfish -a /dev/null -v
><fs> run
[Lots of appliance boot messages]
Now type the command below precisely at the guestfish prompt:
debug sh 'echo -e "\\x01\\x01" >&2'
There are two possible outputs that can happen for libguestfs
in RHEL >= 6.2. If no escaping is being applied (ie. the bug
is present), then you will see TWO lines of garbage output:
The first line comes from the appliance and is not being
escaped. The second line is the output of guestfish which
should not be escaped.
If escaping is being applied, then the first line ONLY will
be escaped:
\x1\x1
^ This is the correct output if the bug has been fixed.
Verified with libguestfs-1.16.2-1.el6.x86_64. 1. Tested as comment 2: [1]. using libguestfs-1.7.17-26.el6.x86_64: ><fs> debug sh 'echo -e "\\x01\\x01" >&2' send_to_daemon: 0x15d61b0 g->state = 3, n = 96 recv_from_daemon: 0x15d61b0 g->state = 3, size_rtn = 0x7fff32ad739c, buf_rtn = 0x7fff32ad7390 /bin/sh -c echo -e "\\x01\\x01" >&2 ><fs> [2]. using libguestfs-1.16.2-1.el6.x86_64 ><fs> debug sh 'echo -e "\\x01\\x01" >&2' libguestfs: send_to_daemon: 96 bytes: 00 00 00 5c | 20 00 f5 f5 | 00 00 00 04 | 00 00 00 4c | 00 00 00 00 | ... guestfsd: main_loop: new request, len 0x5c /bin/sh -c echo -e "\\x01\\x01" >&2 \x1\x1 guestfsd: main_loop: proc 76 (debug) took 0.00 seconds libguestfs: recv_from_daemon: 48 bytes: 20 00 f5 f5 | 00 00 00 04 | 00 00 00 4c | 00 00 00 01 | 00 12 34 01 | ... ><fs> 2. Check with seabios-0.6.1.2-8.el6.x86_64 + qemu-kvm-0.12.1.2-2.209.el6.x86_64: [1] Before the fix, early in the debug output the screen is cleared. [2] After the fix, the control characters are escaped as following: [...] SeaBIOS (version 0.6.1.2-20111101_081028-x86-007.build.bos.redhat.com) Probing EDD (edd=off to disable)... ok \x1b[2J\x1b[2JInitializing cgroup subsys cpuset [...]
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 Documentation needed
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/RHSA-2012-0774.html |