Bug 663407 - readlink and readlinklist returns /sysroot/ in some paths
readlink and readlinklist returns /sysroot/ in some paths
Status: CLOSED UPSTREAM
Product: Virtualization Tools
Classification: Community
Component: libguestfs (Show other bugs)
unspecified
Unspecified Unspecified
low Severity medium
: ---
: ---
Assigned To: Richard W.M. Jones
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-12-15 12:37 EST by Richard W.M. Jones
Modified: 2011-07-14 15:23 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-07-14 15:23:17 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Richard W.M. Jones 2010-12-15 12:37:26 EST
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 12:51:00 EST
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 18:34:11 EST
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.