Bug 1293276
Summary: | guestfish can not ll a symbolic link dir or edit a file in it | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Xianghua Chen <xchen> |
Component: | libguestfs | Assignee: | Pino Toscano <ptoscano> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 6.8 | CC: | huzhan, linl, ptoscano, wshi, xchen |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libguestfs-1.20.11-17.el6 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-05-10 19:56:23 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: | |||
Bug Blocks: | 1301844 |
Description
Xianghua Chen
2015-12-21 09:41:27 UTC
The one line reproducers for both of these (different) problems are: guestfish -N fs -m /dev/sda1 mkdir /dir : ln-s /dir/ /link : touch /link/file1 : vi /link/file1 guestfish -N fs -m /dev/sda1 mkdir /dir : ln-s /dir/ /link : touch /link/file1 : ll /link/ On RHEL 6.7, both commands give me errors. Upstream, the 'vi' test is OK, but the 'll' test fails. (In reply to Richard W.M. Jones from comment #1) > guestfish -N fs -m /dev/sda1 mkdir /dir : ln-s /dir/ /link : touch > /link/file1 : vi /link/file1 I think this has been fixed with 431cdfd983bc9864d6a44a456a97b72455bb17cd, though that applies on the refactoring of the "edit" code (meaning this will need to be duplicated in fish/edit.c and edit/virt-edit.c). (In reply to Richard W.M. Jones from comment #1) > guestfish -N fs -m /dev/sda1 mkdir /dir : ln-s /dir/ /link : touch > /link/file1 : ll /link/ ll is special, as it is executed from the appliance and not from the guest -- that means absolute symlinks won't work. A fix for that could be to just resolve the path in advance, and execute ls on that instead. (In reply to Pino Toscano from comment #3) > (In reply to Richard W.M. Jones from comment #1) > > guestfish -N fs -m /dev/sda1 mkdir /dir : ln-s /dir/ /link : touch > > /link/file1 : ll /link/ > > ll is special, as it is executed from the appliance and not from the guest > -- that means absolute symlinks won't work. A fix for that could be to just > resolve the path in advance, and execute ls on that instead. Patch posted for this: https://www.redhat.com/archives/libguestfs/2016-January/msg00063.html Committed as https://github.com/libguestfs/libguestfs/commit/40b5698388689b54cf8b213a0adc72b35d6014b2 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/RHBA-2016-0762.html |