17013247 BASH env setting does not work on initial login s11u1-sru 0.175.1.13.0.1.0 S11.1SRU13.1
authorJiri Kukacka <jiri.kukacka@oracle.com>
Mon, 30 Sep 2013 11:09:12 +0200
branchs11u1-sru
changeset 2779 534e555d507e
parent 2770 501c20396676
child 2781 25276d7b295c
17013247 BASH env setting does not work on initial login
components/bash/patches/bash41-012.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/bash/patches/bash41-012.patch	Mon Sep 30 11:09:12 2013 +0200
@@ -0,0 +1,21 @@
+- in maybe_append_history, change check for history_lines_this_session
+  so that we append the lines to the file if it's equal to the value
+  returned by where_history(). This means that without this change,
+  the history won't be appended if all the lines in the history list
+  were added in the current session since the last time the history
+  file was read or written. Fixes bug reported by Bruce Korb
+  <[email protected]>
+
+http://lists.gnu.org/archive/html/bug-bash/2010-08/msg00101.html
+
+--- bashhist.c	2009-08-14 12:33:02.000000000 -0700
++++ bashhist.c	2013-08-26 02:05:33.384872000 -0700
[email protected]@ -372,7 +372,7 @@ maybe_append_history (filename)
+   struct stat buf;
+ 
+   result = EXECUTION_SUCCESS;
+-  if (history_lines_this_session && (history_lines_this_session < where_history ()))
++  if (history_lines_this_session && (history_lines_this_session <= where_history ()))
+     {
+       /* If the filename was supplied, then create it if necessary. */
+       if (stat (filename, &buf) == -1 && errno == ENOENT)