This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 572301 - libguestfs-supermin-helper fails if 'ls' is an exported function
libguestfs-supermin-helper fails if 'ls' is an exported function
Status: CLOSED UPSTREAM
Product: Virtualization Tools
Classification: Community
Component: libguestfs (Show other bugs)
unspecified
All Linux
low Severity medium
: ---
: ---
Assigned To: Richard W.M. Jones
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-03-10 14:35 EST by Richard W.M. Jones
Modified: 2010-03-27 05:43 EDT (History)
2 users (show)

See Also:
Fixed In Version: 1.0.86
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-03-27 05:43:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Richard W.M. Jones 2010-03-10 14:35:08 EST
Description of problem:

The libguestfs-supermin-helper command is a /bin/bash script
and runs plain 'ls'.  Unfortunately this fails quite badly
if 'ls' has been redefined as an exported shell function.

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

libguestfs 1.0.85

How reproducible:

Always.

Steps to Reproduce:
1. Redefine function:

 ls ()
 {
   /bin/ls -F "$@"
 }

2. export -f ls
3. Run any libguestfs command, eg. guestfish or
 libguestfs-test-tool
  
Actual results:

Fails if the redefined 'ls' output isn't exactly
like the ordinary 'ls' output.

Expected results:

Should not be affected like this.

Additional info:
Comment 1 Richard W.M. Jones 2010-03-10 14:36:03 EST
You'll see lots of error messages like this:

cpio: ./sbin/fsck.gfs2*: Cannot stat: No such file or directory
cpio: ./sbin/mkfs.gfs2*: Cannot stat: No such file or directory
cpio: ./sbin/mount.gfs2*: Cannot stat: No such file or directory
cpio: ./sbin/dracut*: Cannot stat: No such file or directory
cpio: ./sbin/lsinitrd*: Cannot stat: No such file or directory
cpio: ./sbin/mkinitrd*: Cannot stat: No such file or directory

Notice the asterisk that appears after each command
(because of the ls -F option).
Comment 2 Richard W.M. Jones 2010-03-27 05:43:15 EDT
libguestfs-supermin-helper was rewritten[1] as a C program
in 1.0.86, effectively making this bug obsolete.

[1] http://git.annexia.org/?p=libguestfs.git;a=commit;h=cb9613b993792c1c4b14fa0d9b5001ff644ac2f4

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