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 1473331 - /etc/bash_completion.d/yum-utils.bash runs pkg-config without fully qualified path
Summary: /etc/bash_completion.d/yum-utils.bash runs pkg-config without fully qualified...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: yum-utils
Version: 7.3
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Packaging Maintenance Team
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks: 1630909
TreeView+ depends on / blocked
 
Reported: 2017-07-20 13:52 UTC by James Pearson
Modified: 2019-11-01 11:35 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-07-18 12:02:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description James Pearson 2017-07-20 13:52:26 UTC
Description of problem:

The bash completion script (/etc/bash_completion.d/yum-utils.bash) installed by yum-utils does:

type -t _yum >/dev/null || . $(pkg-config --variable=completionsdir bash-complet
ion)/yum

If another 'pkg-config' is earlier on the PATH, this could cause issues - especially if running '/bin/su' from a user account that doesn't use bash as their default shell (e.g. tcsh)

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

yum-utils-1.1.31-40.el7

How reproducible:

Always

Steps to Reproduce:
1. Set up user account that uses /bin/tcsh as the shell
2. Log in as the user
3. Set up path that includes a directory containing a custom pkg-config script before /usr/bin
4. Run /bin/su and type in root password

Actual results:

User 'root' runs the user's pkg-config script - which can do anything the user wants ...

Expected results:

/usr/bin/pkg-config is run

Additional info:

Ideally, root's .bashrc should set a restricted PATH - but this isn't the case with the shipped version

A simple fix is to make sure pkg-config is executed as /usr/bin/pkg-config in /etc/bash_completion.d/yum-utils.bash

Comment 3 Daniel Mach 2019-07-18 12:02:22 UTC
This bug is not planned to be addressed during Red Hat Enterprise Linux 7 life-cycle.
Please contact Red Hat support if you wish to have it reconsidered.


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