2
1

bash32-011 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. BASH PATCH REPORT
  2. =================
  3. Bash-Release: 3.2
  4. Patch-ID: bash32-011
  5. Bug-Reported-by: Petr Sumbera <Petr.Sumbera@Sun.COM>
  6. Bug-Reference-ID: <45AF5F4B.1020800@sun.com>
  7. Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2007-01/msg00049.html
  8. Bug-Description:
  9. Under certain circumstances (loopback mounts), the bash getcwd does not
  10. return correct results. This patch allows the use of the Solaris libc
  11. getcwd even though it doesn't dynamically allocate memory.
  12. Run `touch configure' to make sure make doesn't try to run autoconf.
  13. Then run configure with whatever options you like.
  14. Patch:
  15. *** ../bash-3.2-patched/configure.in Tue Sep 26 11:05:45 2006
  16. --- bash-3.2/configure.in Wed Jan 31 09:48:00 2007
  17. ***************
  18. *** 6,10 ****
  19. dnl Process this file with autoconf to produce a configure script.
  20. ! # Copyright (C) 1987-2006 Free Software Foundation, Inc.
  21. # This program is free software; you can redistribute it and/or modify
  22. --- 6,10 ----
  23. dnl Process this file with autoconf to produce a configure script.
  24. ! # Copyright (C) 1987-2007 Free Software Foundation, Inc.
  25. # This program is free software; you can redistribute it and/or modify
  26. ***************
  27. *** 992,996 ****
  28. sco3.2*) LOCAL_CFLAGS=-DMUST_UNBLOCK_CHLD ;;
  29. sunos4*) LOCAL_CFLAGS=-DSunOS4 ;;
  30. ! solaris2.5*) LOCAL_CFLAGS=-DSunOS5 ;;
  31. lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
  32. linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
  33. --- 992,997 ----
  34. sco3.2*) LOCAL_CFLAGS=-DMUST_UNBLOCK_CHLD ;;
  35. sunos4*) LOCAL_CFLAGS=-DSunOS4 ;;
  36. ! solaris2.5*) LOCAL_CFLAGS="-DSunOS5 -DSOLARIS" ;;
  37. ! solaris2*) LOCAL_CFLAGS=-DSOLARIS ;;
  38. lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
  39. linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
  40. *** ../bash-3.2-patched/config-bot.h Tue Sep 12 16:43:04 2006
  41. --- bash-3.2/config-bot.h Tue Mar 6 10:41:31 2007
  42. ***************
  43. *** 2,6 ****
  44. /* modify settings or make new ones based on what autoconf tells us. */
  45. ! /* Copyright (C) 1989-2002 Free Software Foundation, Inc.
  46. This file is part of GNU Bash, the Bourne Again SHell.
  47. --- 2,6 ----
  48. /* modify settings or make new ones based on what autoconf tells us. */
  49. ! /* Copyright (C) 1989-2007 Free Software Foundation, Inc.
  50. This file is part of GNU Bash, the Bourne Again SHell.
  51. ***************
  52. *** 71,77 ****
  53. #endif
  54. ! /* If we have a getcwd(3), but it calls popen(), #undef HAVE_GETCWD so
  55. ! the replacement in getcwd.c will be built. */
  56. ! #if defined (HAVE_GETCWD) && defined (GETCWD_BROKEN)
  57. # undef HAVE_GETCWD
  58. #endif
  59. --- 71,79 ----
  60. #endif
  61. ! /* If we have a getcwd(3), but one that does not dynamically allocate memory,
  62. ! #undef HAVE_GETCWD so the replacement in getcwd.c will be built. We do
  63. ! not do this on Solaris, because their implementation of loopback mounts
  64. ! breaks the traditional file system assumptions that getcwd uses. */
  65. ! #if defined (HAVE_GETCWD) && defined (GETCWD_BROKEN) && !defined (SOLARIS)
  66. # undef HAVE_GETCWD
  67. #endif
  68. *** ../bash-3.2-patched/builtins/common.c Thu Jul 27 09:39:51 2006
  69. --- bash-3.2/builtins/common.c Tue Mar 6 10:43:27 2007
  70. ***************
  71. *** 1,3 ****
  72. ! /* Copyright (C) 1987-2005 Free Software Foundation, Inc.
  73. This file is part of GNU Bash, the Bourne Again SHell.
  74. --- 1,3 ----
  75. ! /* Copyright (C) 1987-2007 Free Software Foundation, Inc.
  76. This file is part of GNU Bash, the Bourne Again SHell.
  77. ***************
  78. *** 476,480 ****
  79. --- 476,484 ----
  80. if (the_current_working_directory == 0)
  81. {
  82. + #if defined (GETCWD_BROKEN)
  83. + the_current_working_directory = getcwd (0, PATH_MAX);
  84. + #else
  85. the_current_working_directory = getcwd (0, 0);
  86. + #endif
  87. if (the_current_working_directory == 0)
  88. {
  89. *** ../bash-3.2-patched/configure Tue Sep 26 11:06:01 2006
  90. --- bash-3.2/configure Tue Mar 6 10:59:20 2007
  91. ***************
  92. *** 27317,27321 ****
  93. sco3.2*) LOCAL_CFLAGS=-DMUST_UNBLOCK_CHLD ;;
  94. sunos4*) LOCAL_CFLAGS=-DSunOS4 ;;
  95. ! solaris2.5*) LOCAL_CFLAGS=-DSunOS5 ;;
  96. lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
  97. linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
  98. --- 27317,27322 ----
  99. sco3.2*) LOCAL_CFLAGS=-DMUST_UNBLOCK_CHLD ;;
  100. sunos4*) LOCAL_CFLAGS=-DSunOS4 ;;
  101. ! solaris2.5*) LOCAL_CFLAGS="-DSunOS5 -DSOLARIS" ;;
  102. ! solaris2*) LOCAL_CFLAGS=-DSOLARIS ;;
  103. lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
  104. linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
  105. *** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006
  106. --- bash-3.2/patchlevel.h Mon Oct 16 14:22:54 2006
  107. ***************
  108. *** 26,30 ****
  109. looks for to find the patch level (for the sccs version string). */
  110. ! #define PATCHLEVEL 10
  111. #endif /* _PATCHLEVEL_H_ */
  112. --- 26,30 ----
  113. looks for to find the patch level (for the sccs version string). */
  114. ! #define PATCHLEVEL 11
  115. #endif /* _PATCHLEVEL_H_ */