*** ../bash-20131025/builtins/cd.def 2013-10-20 22:09:22.000000000 -0400 --- builtins/cd.def 2013-11-06 18:04:24.000000000 -0500 *************** *** 217,223 **** path valid, we need to keep the file descriptor open as long as we are in this directory. This imposes a certain structure on /proc. */ - sprintf (buff, "/proc/%d/fd/%d", getpid(), fd); if (ndirp) ! *ndirp = savestring (buff); if (xattrfd >= 0) --- 217,225 ---- path valid, we need to keep the file descriptor open as long as we are in this directory. This imposes a certain structure on /proc. */ if (ndirp) ! { ! sprintf (buf, "/proc/%d/fd/%d", getpid(), fd); ! *ndirp = savestring (buf); ! } if (xattrfd >= 0) *************** *** 272,275 **** --- 274,278 ---- eflag = 0; no_symlinks = no_symbolic_links; + xattrflag = 0; reset_internal_getopt (); #if defined (O_XATTR) *************** *** 589,592 **** --- 592,602 ---- tdir = ndir; } + else + { + err = errno; + free (tdir); + errno = err; + return (0); /* no xattr */ + } } else