Bug 663407 - readlink and readlinklist returns /sysroot/ in some paths
Summary: readlink and readlinklist returns /sysroot/ in some paths
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-12-15 17:37 UTC by Richard W.M. Jones
Modified: 2011-07-14 19:23 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-14 19:23:17 UTC
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2010-12-15 17:37:26 UTC
Description of problem:

eg. On a Windows guest:

guestfish --ro -i -d Win7x32 <<EOF
  readlinklist /Users/rjones Cookies
EOF
/sysroot//Users/rjones/AppData/Roaming/Microsoft/Windows/Cookies

guestfish --ro -i -d Win7x32 <<EOF
  readlink /Users/rjones/Cookies
EOF
/sysroot//Users/rjones/AppData/Roaming/Microsoft/Windows/Cookies

Notice the extra /sysroot/ in the path returned by both
calls.

Version-Release number of selected component (if applicable):

libguestfs-1.7.23-1.fc15.x86_64

How reproducible:

Always.

Steps to Reproduce:
1. As in description.
2.
3.
  
Actual results:

/sysroot/ in path

Expected results:

sysroot is an internal libguestfs concept and should not be
exposed through the API.

Additional info:

Comment 1 Richard W.M. Jones 2010-12-16 17:51:00 UTC
This only happens on NTFS and seems to be related
to this:
http://b.andre.pagesperso-orange.fr/junctions.html

Comment 2 Richard W.M. Jones 2010-12-16 23:34:11 UTC
There's not really a good way to solve this w/o fixing
ntfs-3g, but in the meantime I added a new API and documented
how to use it to get to the original reparse data from
NTFS:

http://git.annexia.org/?p=libguestfs.git;a=commit;h=3a3836b933b80c4f9f2c767fda4f8b459f998db2
http://git.annexia.org/?p=libguestfs.git;a=commit;h=933e970b8ac654586bc3595f56b187fab65b1173


Note You need to log in before you can comment on or make changes to this bug.