Tomas Janousek 5a0cfd
			     BASH PATCH REPORT
Tomas Janousek 5a0cfd
			     =================
Tomas Janousek 5a0cfd
Tomas Janousek 5a0cfd
Bash-Release: 3.2
Tomas Janousek 5a0cfd
Patch-ID: bash32-011
Tomas Janousek 5a0cfd
Tomas Janousek 5a0cfd
Bug-Reported-by: Petr Sumbera <Petr.Sumbera@Sun.COM>
Tomas Janousek 5a0cfd
Bug-Reference-ID: <45AF5F4B.1020800@sun.com>
Tomas Janousek 5a0cfd
Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2007-01/msg00049.html
Tomas Janousek 5a0cfd
Tomas Janousek 5a0cfd
Bug-Description:
Tomas Janousek 5a0cfd
Tomas Janousek 5a0cfd
Under certain circumstances (loopback mounts), the bash getcwd does not
Tomas Janousek 5a0cfd
return correct results.  This patch allows the use of the Solaris libc
Tomas Janousek 5a0cfd
getcwd even though it doesn't dynamically allocate memory.
Tomas Janousek 5a0cfd
Tomas Janousek 5a0cfd
Run `touch configure' to make sure make doesn't try to run autoconf.
Tomas Janousek 5a0cfd
Then run configure with whatever options you like.
Tomas Janousek 5a0cfd
Tomas Janousek 5a0cfd
Patch:
Tomas Janousek 5a0cfd
Tomas Janousek 5a0cfd
*** ../bash-3.2-patched/configure.in	Tue Sep 26 11:05:45 2006
Tomas Janousek 5a0cfd
--- configure.in	Wed Jan 31 09:48:00 2007
Tomas Janousek 5a0cfd
***************
Tomas Janousek 5a0cfd
*** 6,10 ****
Tomas Janousek 5a0cfd
  dnl Process this file with autoconf to produce a configure script.
Tomas Janousek 5a0cfd
  
Tomas Janousek 5a0cfd
! # Copyright (C) 1987-2006 Free Software Foundation, Inc.
Tomas Janousek 5a0cfd
  
Tomas Janousek 5a0cfd
  # This program is free software; you can redistribute it and/or modify
Tomas Janousek 5a0cfd
--- 6,10 ----
Tomas Janousek 5a0cfd
  dnl Process this file with autoconf to produce a configure script.
Tomas Janousek 5a0cfd
  
Tomas Janousek 5a0cfd
! # Copyright (C) 1987-2007 Free Software Foundation, Inc.
Tomas Janousek 5a0cfd
  
Tomas Janousek 5a0cfd
  # This program is free software; you can redistribute it and/or modify
Tomas Janousek 5a0cfd
***************
Tomas Janousek 5a0cfd
*** 992,996 ****
Tomas Janousek 5a0cfd
  sco3.2*)	LOCAL_CFLAGS=-DMUST_UNBLOCK_CHLD ;;
Tomas Janousek 5a0cfd
  sunos4*)	LOCAL_CFLAGS=-DSunOS4 ;;
Tomas Janousek 5a0cfd
! solaris2.5*)	LOCAL_CFLAGS=-DSunOS5 ;;
Tomas Janousek 5a0cfd
  lynxos*)	LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
Tomas Janousek 5a0cfd
  linux*)		LOCAL_LDFLAGS=-rdynamic		 # allow dynamic loading
Tomas Janousek 5a0cfd
--- 992,997 ----
Tomas Janousek 5a0cfd
  sco3.2*)	LOCAL_CFLAGS=-DMUST_UNBLOCK_CHLD ;;
Tomas Janousek 5a0cfd
  sunos4*)	LOCAL_CFLAGS=-DSunOS4 ;;
Tomas Janousek 5a0cfd
! solaris2.5*)	LOCAL_CFLAGS="-DSunOS5 -DSOLARIS" ;;
Tomas Janousek 5a0cfd
! solaris2*)	LOCAL_CFLAGS=-DSOLARIS ;;
Tomas Janousek 5a0cfd
  lynxos*)	LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
Tomas Janousek 5a0cfd
  linux*)		LOCAL_LDFLAGS=-rdynamic		 # allow dynamic loading
Tomas Janousek 5a0cfd
*** ../bash-3.2-patched/config-bot.h	Tue Sep 12 16:43:04 2006
Tomas Janousek 5a0cfd
--- config-bot.h	Tue Mar  6 10:41:31 2007
Tomas Janousek 5a0cfd
***************
Tomas Janousek 5a0cfd
*** 2,6 ****
Tomas Janousek 5a0cfd
  /* modify settings or make new ones based on what autoconf tells us. */
Tomas Janousek 5a0cfd
  
Tomas Janousek 5a0cfd
! /* Copyright (C) 1989-2002 Free Software Foundation, Inc.
Tomas Janousek 5a0cfd
  
Tomas Janousek 5a0cfd
     This file is part of GNU Bash, the Bourne Again SHell.
Tomas Janousek 5a0cfd
--- 2,6 ----
Tomas Janousek 5a0cfd
  /* modify settings or make new ones based on what autoconf tells us. */
Tomas Janousek 5a0cfd
  
Tomas Janousek 5a0cfd
! /* Copyright (C) 1989-2007 Free Software Foundation, Inc.
Tomas Janousek 5a0cfd
  
Tomas Janousek 5a0cfd
     This file is part of GNU Bash, the Bourne Again SHell.
Tomas Janousek 5a0cfd
***************
Tomas Janousek 5a0cfd
*** 71,77 ****
Tomas Janousek 5a0cfd
  #endif
Tomas Janousek 5a0cfd
  
Tomas Janousek 5a0cfd
! /* If we have a getcwd(3), but it calls popen(), #undef HAVE_GETCWD so
Tomas Janousek 5a0cfd
!    the replacement in getcwd.c will be built. */
Tomas Janousek 5a0cfd
! #if defined (HAVE_GETCWD) && defined (GETCWD_BROKEN)
Tomas Janousek 5a0cfd
  #  undef HAVE_GETCWD
Tomas Janousek 5a0cfd
  #endif
Tomas Janousek 5a0cfd
--- 71,79 ----
Tomas Janousek 5a0cfd
  #endif
Tomas Janousek 5a0cfd
  
Tomas Janousek 5a0cfd
! /* If we have a getcwd(3), but one that does not dynamically allocate memory,
Tomas Janousek 5a0cfd
!    #undef HAVE_GETCWD so the replacement in getcwd.c will be built.  We do
Tomas Janousek 5a0cfd
!    not do this on Solaris, because their implementation of loopback mounts
Tomas Janousek 5a0cfd
!    breaks the traditional file system assumptions that getcwd uses. */
Tomas Janousek 5a0cfd
! #if defined (HAVE_GETCWD) && defined (GETCWD_BROKEN) && !defined (SOLARIS)
Tomas Janousek 5a0cfd
  #  undef HAVE_GETCWD
Tomas Janousek 5a0cfd
  #endif
Tomas Janousek 5a0cfd
*** ../bash-3.2-patched/builtins/common.c	Thu Jul 27 09:39:51 2006
Tomas Janousek 5a0cfd
--- builtins/common.c	Tue Mar  6 10:43:27 2007
Tomas Janousek 5a0cfd
***************
Tomas Janousek 5a0cfd
*** 1,3 ****
Tomas Janousek 5a0cfd
! /* Copyright (C) 1987-2005 Free Software Foundation, Inc.
Tomas Janousek 5a0cfd
  
Tomas Janousek 5a0cfd
     This file is part of GNU Bash, the Bourne Again SHell.
Tomas Janousek 5a0cfd
--- 1,3 ----
Tomas Janousek 5a0cfd
! /* Copyright (C) 1987-2007 Free Software Foundation, Inc.
Tomas Janousek 5a0cfd
  
Tomas Janousek 5a0cfd
     This file is part of GNU Bash, the Bourne Again SHell.
Tomas Janousek 5a0cfd
***************
Tomas Janousek 5a0cfd
*** 476,480 ****
Tomas Janousek 5a0cfd
--- 476,484 ----
Tomas Janousek 5a0cfd
    if (the_current_working_directory == 0)
Tomas Janousek 5a0cfd
      {
Tomas Janousek 5a0cfd
+ #if defined (GETCWD_BROKEN)
Tomas Janousek 5a0cfd
+       the_current_working_directory = getcwd (0, PATH_MAX);
Tomas Janousek 5a0cfd
+ #else
Tomas Janousek 5a0cfd
        the_current_working_directory = getcwd (0, 0);
Tomas Janousek 5a0cfd
+ #endif
Tomas Janousek 5a0cfd
        if (the_current_working_directory == 0)
Tomas Janousek 5a0cfd
  	{
Tomas Janousek 5a0cfd
*** ../bash-3.2-patched/configure	Tue Sep 26 11:06:01 2006
Tomas Janousek 5a0cfd
--- configure	Tue Mar  6 10:59:20 2007
Tomas Janousek 5a0cfd
***************
Tomas Janousek 5a0cfd
*** 27317,27321 ****
Tomas Janousek 5a0cfd
  sco3.2*)	LOCAL_CFLAGS=-DMUST_UNBLOCK_CHLD ;;
Tomas Janousek 5a0cfd
  sunos4*)	LOCAL_CFLAGS=-DSunOS4 ;;
Tomas Janousek 5a0cfd
! solaris2.5*)	LOCAL_CFLAGS=-DSunOS5 ;;
Tomas Janousek 5a0cfd
  lynxos*)	LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
Tomas Janousek 5a0cfd
  linux*)		LOCAL_LDFLAGS=-rdynamic		 # allow dynamic loading
Tomas Janousek 5a0cfd
--- 27317,27322 ----
Tomas Janousek 5a0cfd
  sco3.2*)	LOCAL_CFLAGS=-DMUST_UNBLOCK_CHLD ;;
Tomas Janousek 5a0cfd
  sunos4*)	LOCAL_CFLAGS=-DSunOS4 ;;
Tomas Janousek 5a0cfd
! solaris2.5*)	LOCAL_CFLAGS="-DSunOS5 -DSOLARIS" ;;
Tomas Janousek 5a0cfd
! solaris2*)	LOCAL_CFLAGS=-DSOLARIS ;;
Tomas Janousek 5a0cfd
  lynxos*)	LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
Tomas Janousek 5a0cfd
  linux*)		LOCAL_LDFLAGS=-rdynamic		 # allow dynamic loading
Tomas Janousek 5a0cfd
*** ../bash-3.2/patchlevel.h	Thu Apr 13 08:31:04 2006
Tomas Janousek 5a0cfd
--- patchlevel.h	Mon Oct 16 14:22:54 2006
Tomas Janousek 5a0cfd
***************
Tomas Janousek 5a0cfd
*** 26,30 ****
Tomas Janousek 5a0cfd
     looks for to find the patch level (for the sccs version string). */
Tomas Janousek 5a0cfd
  
Tomas Janousek 5a0cfd
! #define PATCHLEVEL 10
Tomas Janousek 5a0cfd
  
Tomas Janousek 5a0cfd
  #endif /* _PATCHLEVEL_H_ */
Tomas Janousek 5a0cfd
--- 26,30 ----
Tomas Janousek 5a0cfd
     looks for to find the patch level (for the sccs version string). */
Tomas Janousek 5a0cfd
  
Tomas Janousek 5a0cfd
! #define PATCHLEVEL 11
Tomas Janousek 5a0cfd
  
Tomas Janousek 5a0cfd
  #endif /* _PATCHLEVEL_H_ */