From nobody Sat Oct 18 00:10:11 1997 Received: (from nobody@localhost) by hub.freebsd.org (8.8.7/8.8.7) id AAA01895; Sat, 18 Oct 1997 00:10:11 -0700 (PDT) (envelope-from nobody) Message-Id: <199710180710.AAA01895@hub.freebsd.org> Date: Sat, 18 Oct 1997 00:10:11 -0700 (PDT) From: dan@math.berkeley.edu To: freebsd-gnats-submit@freebsd.org Subject: glitch in /bin/sh cd command X-Send-Pr-Version: www-1.0 >Number: 4795 >Category: bin >Synopsis: glitch in /bin/sh cd command >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: closed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Oct 18 00:20:01 PDT 1997 >Closed-Date: Wed Sep 16 23:37:25 MEST 1998 >Last-Modified: Wed Sep 16 23:37:57 MEST 1998 >Originator: Daniel R. Strick >Release: 2.2-970930-RELENG >Organization: U.C. Berkeley >Environment: FreeBSD miwok.berkeley.edu 2.2-970930-RELENG FreeBSD 2.2-970930-RELENG #0: Sun Oct 5 01:29:45 GMT 1997 root@miwok.berkeley.edu:/usr/src/sys/compile/MIWOK i386 >Description: The cd command built into /bin/sh breaks if the shell cannot determine the path leading to the current working directory. This bug can be really nasty because it doesn't teminate the current command, causing shell scripts to run in the wrong directory. Example: miwok% cd /tmp miwok% mkdir -p topdir topdir/middir topdir/middir/botdir miwok% chmod 111 topdir miwok% cd topdir/middir miwok% ls -ls total 1 1 drwxr-xr-x 2 dan bin 512 Oct 17 23:57 botdir miwok% sh sh: cannot determine working directory $ ls -ls total 1 1 drwxr-xr-x 2 dan bin 512 Oct 17 23:57 botdir $ cd botdir; ls -ls cd: can't cd to botdir total 1 1 drwxr-xr-x 2 dan bin 512 Oct 17 23:57 botdir $ >How-To-Repeat: see the example in the "Full Description" >Fix: >Release-Note: >Audit-Trail: State-Changed-From-To: open->closed State-Changed-By: cracauer State-Changed-When: Wed Sep 16 23:37:25 MEST 1998 State-Changed-Why: This has been fixed by Tor Egges recent sh cd cleanups. >Unformatted: