]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/bash/bash32-041
Merge remote-tracking branch 'origin/next' into thirteen
[people/teissler/ipfire-2.x.git] / src / patches / bash / bash32-041
1 BASH PATCH REPORT
2 =================
3
4 Bash-Release: 3.2
5 Patch-ID: bash32-041
6
7 Bug-Reported-by: Dan Jacobson <jidanni@jidanni.org>
8 Bug-Reference-ID: <873arjs11h.fsf@jidanni.org>
9 Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2008-02/msg00049.html
10
11 Bug-Description:
12
13 Bash saved and restored the value of `set -o history' while sourcing files,
14 preventing users from turning off history with `set +o history' in .bashrc.
15
16 Patch:
17
18 *** ../bash-3.2-patched/bashhist.c 2005-12-26 13:31:16.000000000 -0500
19 --- bashhist.c 2008-08-17 13:07:40.000000000 -0400
20 ***************
21 *** 81,84 ****
22 --- 81,85 ----
23 becomes zero when we read lines from a file, for example. */
24 int remember_on_history = 1;
25 + int enable_history_list = 1; /* value for `set -o history' */
26
27 /* The number of lines that Bash has added to this history session. The
28 ***************
29 *** 235,239 ****
30 history_expansion_inhibited = 1;
31 #endif
32 ! remember_on_history = interact != 0;
33 history_inhibit_expansion_function = bash_history_inhibit_expansion;
34 }
35 --- 236,240 ----
36 history_expansion_inhibited = 1;
37 #endif
38 ! remember_on_history = enable_history_list = interact != 0;
39 history_inhibit_expansion_function = bash_history_inhibit_expansion;
40 }
41 *** ../bash-3.2-patched/builtins/set.def 2006-07-27 09:41:43.000000000 -0400
42 --- builtins/set.def 2008-08-14 16:33:41.000000000 -0400
43 ***************
44 *** 190,194 ****
45 #endif /* BANG_HISTORY */
46 #if defined (HISTORY)
47 ! { "history", '\0', &remember_on_history, bash_set_history, (setopt_get_func_t *)NULL },
48 #endif
49 { "ignoreeof", '\0', &ignoreeof, set_ignoreeof, (setopt_get_func_t *)NULL },
50 --- 198,202 ----
51 #endif /* BANG_HISTORY */
52 #if defined (HISTORY)
53 ! { "history", '\0', &enable_history_list, bash_set_history, (setopt_get_func_t *)NULL },
54 #endif
55 { "ignoreeof", '\0', &ignoreeof, set_ignoreeof, (setopt_get_func_t *)NULL },
56 ***************
57 *** 382,385 ****
58 --- 390,394 ----
59 if (on_or_off == FLAG_ON)
60 {
61 + enable_history_list = 1;
62 bash_history_enable ();
63 if (history_lines_this_session == 0)
64 ***************
65 *** 387,392 ****
66 }
67 else
68 ! bash_history_disable ();
69 ! return (1 - remember_on_history);
70 }
71 #endif
72 --- 396,404 ----
73 }
74 else
75 ! {
76 ! enable_history_list = 0;
77 ! bash_history_disable ();
78 ! }
79 ! return (1 - enable_history_list);
80 }
81 #endif
82 ***************
83 *** 566,570 ****
84 {
85 #if defined (HISTORY)
86 ! remember_on_history = 1;
87 #endif
88 ignoreeof = 0;
89 --- 578,582 ----
90 {
91 #if defined (HISTORY)
92 ! remember_on_history = enable_history_list = 1;
93 #endif
94 ignoreeof = 0;
95 *** ../bash-3.2-patched/builtins/evalstring.c 2006-07-28 15:12:16.000000000 -0400
96 --- builtins/evalstring.c 2008-11-10 21:17:16.000000000 -0500
97 ***************
98 *** 68,71 ****
99 --- 68,79 ----
100 static int cat_file __P((REDIRECT *));
101
102 + #if defined (HISTORY)
103 + static void
104 + set_history_remembering ()
105 + {
106 + remember_on_history = enable_history_list;
107 + }
108 + #endif
109 +
110 /* How to force parse_and_execute () to clean up after itself. */
111 void
112 ***************
113 *** 116,120 ****
114
115 #if defined (HISTORY)
116 ! unwind_protect_int (remember_on_history); /* can be used in scripts */
117 # if defined (BANG_HISTORY)
118 if (interactive_shell)
119 --- 124,131 ----
120
121 #if defined (HISTORY)
122 ! if (parse_and_execute_level == 0)
123 ! add_unwind_protect (set_history_remembering, (char *)NULL);
124 ! else
125 ! unwind_protect_int (remember_on_history); /* can be used in scripts */
126 # if defined (BANG_HISTORY)
127 if (interactive_shell)
128 *** ../bash-3.2-patched/bashhist.h 2005-07-01 15:44:41.000000000 -0400
129 --- bashhist.h 2008-08-17 12:51:07.000000000 -0400
130 ***************
131 *** 32,35 ****
132 --- 32,38 ----
133
134 extern int remember_on_history;
135 + extern int enable_history_list; /* value for `set -o history' */
136 + extern int literal_history; /* controlled by `shopt lithist' */
137 + extern int force_append_history;
138 extern int history_lines_this_session;
139 extern int history_lines_in_file;
140 *** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006
141 --- patchlevel.h Mon Oct 16 14:22:54 2006
142 ***************
143 *** 26,30 ****
144 looks for to find the patch level (for the sccs version string). */
145
146 ! #define PATCHLEVEL 40
147
148 #endif /* _PATCHLEVEL_H_ */
149 --- 26,30 ----
150 looks for to find the patch level (for the sccs version string). */
151
152 ! #define PATCHLEVEL 41
153
154 #endif /* _PATCHLEVEL_H_ */