Bug 980372
Summary: | "hivex-commit" should fail with a relative path | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | bfan | |
Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> | |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | |
Severity: | medium | Docs Contact: | ||
Priority: | medium | |||
Version: | 6.5 | CC: | leiwang, wshi | |
Target Milestone: | rc | |||
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | libguestfs-1.20.9-7.el6 | Doc Type: | Bug Fix | |
Doc Text: |
Cause: Using hivex-commit command in guestfish.
Consequence: Using hivex-commit with a relative path parameter would succeed, but it should give an error. (It writes the hive to an inaccessible place, so it's useless for end users)
Fix: hivex-commit fixed
Result: Using hivex-commit with a relative path parameter will now fail with an error. You must use an absolute path; or a NULL path (means: overwrite the original).
|
Story Points: | --- | |
Clone Of: | 905322 | |||
: | 981683 (view as bug list) | Environment: | ||
Last Closed: | 2013-11-21 04:45:38 UTC | Type: | Bug | |
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: | 981683 | |||
Bug Blocks: |
Description
bfan
2013-07-02 07:47:24 UTC
Sorry, may something wrong during my test. Actually it works, not a bug, please close it. In fact there is a bug here. Test script. You'll need 'minimal' from https://github.com/libguestfs/hivex/blob/master/images/minimal and note that you have to uncomment only *one* of the three hivex-commit lines in the script. guestfish -x -N fs -m /dev/sda1 <<EOF upload /mnt/scratch/minimal /minimal hivex-open /minimal write:true #hivex-commit "" #hivex-commit "/minimal" hivex-commit "minimal" EOF The first case (NULL) should always succeed and it does. The second case (absolute path "/minimal") should succeed and it does. The third case (relative path "minimal") should fail because relative paths shouldn't be allowed. It doesn't fail, so that is a bug. Upstream fix: https://github.com/libguestfs/libguestfs/commit/c8f0a2eb76a39a009e0591f73e5249f3bcfc4ee8 Verified with libguestfs-1.20.11-1.el6.x86_64 Test according to #C2 (1) successed guestfish -x -N fs -m /dev/sda1 <<EOF upload /mnt/scratch/minimal /minimal hivex-open /minimal write:true hivex-commit "" #hivex-commit "/minimal" #hivex-commit "minimal" EOF (2) successed guestfish -x -N fs -m /dev/sda1 <<EOF upload /mnt/scratch/minimal /minimal hivex-open /minimal write:true #hivex-commit "" hivex-commit "/minimal" #hivex-commit "minimal" EOF (3) libguestfs: error: hivex_commit: do_hivex_commit: path must start with a / character guestfish -x -N fs -m /dev/sda1 <<EOF upload /mnt/scratch/minimal /minimal hivex-open /minimal write:true #hivex-commit "" #hivex-commit "/minimal" hivex-commit "minimal" EOF So change the status to verified 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-2013-1536.html |