RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 883054 - iutil.execWithCallback does not honor root option
Summary: iutil.execWithCallback does not honor root option
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: anaconda
Version: 6.3
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: rc
: ---
Assignee: Samantha N. Bueno
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-03 17:16 UTC by Andy Grimm
Modified: 2016-11-08 03:48 UTC (History)
4 users (show)

Fixed In Version: anaconda-13.21.242-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-10 20:42:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
One-line patch to fix this bug (373 bytes, patch)
2012-12-03 17:16 UTC, Andy Grimm
no flags Details | Diff
patch for RHEL 6 branch (329 bytes, patch)
2012-12-04 18:16 UTC, Andy Grimm
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0798 0 normal SHIPPED_LIVE anaconda bug fix and enhancement update 2016-05-10 22:37:41 UTC

Description Andy Grimm 2012-12-03 17:16:05 UTC
Created attachment 656845 [details]
One-line patch to fix this bug

Description of problem:

When writing a custom install class, I attempt to use iutil.execWithCallback to run a chrooted command.  My code failed because execWithCallback never actually makes a chroot call.

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

This issue was present in anaconda in RHEL 6.3 (and many prior versions), and is still present in the master branch.

How reproducible:

Always

Steps to Reproduce:

1. Create a custom install class
2. Define a postAction method
3. Have the method call iutil.execWithCallback with root='/mnt/sysimage'

Actual results:

The method tries to exec without chrooting, often resulting in a buried "Command not found" error.

Expected results:

The command should run chrooted.

Comment 2 David Cantrell 2012-12-03 21:26:45 UTC
RHEL-7 or RHEL-6?  Your patch isn't against rhel6-branch.

Comment 3 Andy Grimm 2012-12-04 18:16:42 UTC
Created attachment 657674 [details]
patch for RHEL 6 branch

Sorry, here's the RHEL 6 version of the patch.  I forgot that the file path of util.py changed... the patch is otherwise identical across branches.

Comment 4 RHEL Program Management 2013-05-06 21:17:18 UTC
This request was evaluated by Red Hat Product Management for
inclusion in a Red Hat Enterprise Linux release.  Product
Management has requested further review of this request by
Red Hat Engineering, for potential inclusion in a Red Hat
Enterprise Linux release for currently deployed products.
This request is not yet committed for inclusion in a release.

Comment 6 Samantha N. Bueno 2015-07-17 15:27:59 UTC
Moving this to 6.8 planning.

Comment 8 Jan Stodola 2016-02-22 13:13:40 UTC
execWithCallback is chrooted as expected:

-bash-4.1# export PYTHONPATH="/usr/lib/anaconda"
-bash-4.1# ls -l /mnt/sysimage/test
ls: cannot access /mnt/sysimage/test: No such file or directory
-bash-4.1# python                               
Python 2.6.6 (r266:84292, May 22 2015, 08:34:51) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-15)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import iutil
>>> iutil.execWithCallback('touch', ['/test'], root='/mnt/sysimage')
0
>>> 
-bash-4.1# ls -l /mnt/sysimage/test
-rw-r--r--. 1 root root 0 Feb 22 08:11 /mnt/sysimage/test
-bash-4.1#

Moving to VERIFIED.

Comment 11 errata-xmlrpc 2016-05-10 20:42:19 UTC
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-0798.html


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