Bug 892834
Summary: | guestmount: rename() incorrectly follows symbolic links | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Colin Walters <walters> | |
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.5 | CC: | bfan, leiwang, wshi | |
Target Milestone: | rc | |||
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | libguestfs-1.20.9-5.el6 | Doc Type: | Bug Fix | |
Doc Text: |
Cause: Renaming a file in guestmount when the target is a symlink.
Consequence: guestmount would follow the symlink instead of overwriting it.
Fix: A new 'guestfs_rename' API has been added and guestmount now uses it.
Result: Renaming a file will overwrite the target.
|
Story Points: | --- | |
Clone Of: | ||||
: | 895910 (view as bug list) | Environment: | ||
Last Closed: | 2013-11-21 04:42:39 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: | 895910, 958183 | |||
Bug Blocks: |
Description
Colin Walters
2013-01-07 23:49:26 UTC
This request was not resolved in time for the current release. Red Hat invites you to ask your support representative to propose this request, if still desired, for consideration in the next release of Red Hat Enterprise Linux. Requires the following commits: https://bugzilla.redhat.com/show_bug.cgi?id=895910#c3 Thanks! I'll try to get some time to do some testing on the latest Fedora builds (and/or try backporting these myself to RHEL 6.4) This is fixed by the rebase (bug 958183). Verified with libguestfs-1.20.9-6.el6 [root@]# guestmount -a test1.img -m /dev/sda1 /mnt [root@]# cd /mnt [root@dhcp-9-42 mnt]# ls lost+found [root@dhcp-9-42 mnt]# mkdir adir [root@dhcp-9-42 mnt]# mkdir bdir [root@dhcp-9-42 mnt]# ln -s adir current [root@dhcp-9-42 mnt]# ln -s bdir new [root@dhcp-9-42 mnt]# mv -T -f new current [root@dhcp-9-42 mnt]# ls -al total 19 drwxr-xr-x. 5 root root 1024 Jul 30 22:32 . dr-xr-xr-x. 28 root root 4096 Jul 29 18:08 .. drwxr-xr-x. 2 root root 1024 Jul 30 22:31 adir drwxr-xr-x. 2 root root 1024 Jul 30 22:31 bdir lrwxrwxrwx. 1 root root 4 Jul 30 22:31 current -> bdir drwx------. 2 root root 12288 Jul 30 22:30 lost+found Can get the current link to bdir, so change the status to verfied 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 |