bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bash symlink not followed as expected.


From: Thomas Shaw - Oracle Corp
Subject: Bash symlink not followed as expected.
Date: Thu, 21 Oct 2010 16:54:00 +0100
User-agent: Thunderbird 2.0.0.23 (X11/20090910)

Hey All,

Not sure if this is a bug but logging anyway just in case.

Rgds,
Thomas

   * The version number and release status of Bash (e.g., 2.05-release)
         o GNU bash, version 3.00.16(1)-release-(i386-pc-solaris2.10)
   * The machine and OS that it is running on (you may run /bashversion
     -l/ from the bash build directory or look at the `.made' file in
     that directory for this information)
         o          Netra x4450
         o            Oracle Solaris 10 9/10 s10x_u9wos_14a X86
                Copyright (c) 2010, Oracle and/or its affiliates. All
           rights reserved.
                                       Assembled 11 August 2010

   * A description of the bug


Symlink path is not followed as expected.  For example:

bash-3.00# pwd
/ee/oce
bash-3.00# ls -l oracle
lrwxrwxrwx   1 oracle   oinstall       6 Oct 12 12:03 oracle -> ../oce
bash-3.00# cd oracle
bash-3.00# pwd
/ee/oce/oracle
bash-3.00# cd oracle
bash-3.00# pwd
/ee/oce/oracle/oracle
bash-3.00# cd oracle
bash-3.00# pwd
/ee/oce/oracle/oracle/oracle
bash-3.00# cd oracle
bash-3.00# pwd
/ee/oce/oracle/oracle/oracle/oracle
bash-3.00# sh
# pwd
/export/home/database/11g/oce
# cd /ee/oce
# ls -l oracle
lrwxrwxrwx   1 oracle   oinstall       6 Oct 12 12:03 oracle -> ../oce
# cd oracle
# pwd
/export/home/database/11g/oce
# cd oracle
# pwd
/export/home/database/11g/oce

   * A recipe for recreating the bug reliably

Make a directory and symlink back to a previous directory.

# cd /var/tmp
# mkdir tom
# cd tom
# ln -s ../tom link
# cd link
# pwd
/var/tmp/tom
# cd link
# pwd
/var/tmp/tom
# bash
bash-3.00# cd link
bash-3.00# cd link
bash-3.00# pwd
/var/tmp/tom/link/link

   * A fix for the bug if you have one!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]