Bug 663407

Summary: readlink and readlinklist returns /sysroot/ in some paths
Product: [Community] Virtualization Tools Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedCC: mbooth, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-14 19:23:17 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:

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