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 1278156 - bash is inconsistent in respect to symlink followup
Summary: bash is inconsistent in respect to symlink followup
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: bash
Version: 7.2
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Siteshwar Vashisht
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-04 19:27 UTC by Marek Haicman
Modified: 2016-05-23 06:33 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-23 06:33:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Marek Haicman 2015-11-04 19:27:03 UTC
Description of problem:
When user is in symlink pointing into directory, there is disparity between behaviour of bash completion and coreutils commands.

Situation [annotated find output]:
./a
./a/A
./b
./b/c [target dir of symlink]
./b/c/B
./c [symlink to absolute ./b/c]


after going into ./c, there is disparity - bash understands .. as original ./, coreutils as ./b.

Bash even tries to use './' in tab completion, but fails when you try to continue to for example ./a [as autocompletion understands a as a file, not as directory]

Version-Release number of selected component (if applicable):
bash-4.2.46-19.el7

How reproducible:
Reliably

Steps to Reproduce:
1. Create structure noted above
2. cd c
3a. cat ../[tab][tab]  // now original ./ is displayed
3b. continue autocompletion with a // but it does not behave as directory but as a file [it is autocompleted with space after it - obviously wrong]

and as an illustration of coreutils behavior:
4. cat ../a/A   // failure 'cat: ../a/A: No such file or directory'
5. cat ../../a/A // success

Actual results:
inlined in reproduction steps

Expected results:
autocompletion of ../ looks into ./b/ directory [to be consistent with the rest of utilities]

Comment 2 Siteshwar Vashisht 2016-05-17 10:03:19 UTC
bash follows posix behaviour[1] and it is not aware if the external commands repsect symbolic links in current working directory path.

To avoid this issue you can use 'cd' with '-P' switch, or use 'set -o physical' flag to by default use physical paths in bash.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/cd.html


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