Submitted By: Jim Gifford (jim at cross-lfs dot org) Date: 01-08-2009 Initial Package Version: 3.2 Origin: Various Upstream Status: Applied Description: Contains all Fixes from Various Sources Fedora: http://cvs.fedoraproject.org/viewvc/rpms/bash/F-10/bash-2.02-security.patch http://cvs.fedoraproject.org/viewvc/rpms/bash/F-10/bash-2.03-paths.patch http://cvs.fedoraproject.org/viewvc/rpms/bash/F-10/bash-2.05b-readline-oom.patch http://cvs.fedoraproject.org/viewvc/rpms/bash/F-10/bash-3.2-190350.patch http://cvs.fedoraproject.org/viewvc/rpms/bash/F-10/bash-3.2-comp_wordbreaks.patch All have been validated to be issues in CLFS. diff -Naur bash-3.2.orig/config.h.in bash-3.2/config.h.in --- bash-3.2.orig/config.h.in 2009-01-08 15:56:12.000000000 -0800 +++ bash-3.2/config.h.in 2009-01-08 16:05:44.000000000 -0800 @@ -201,7 +201,7 @@ /* System paths */ -#define DEFAULT_MAIL_DIRECTORY "/usr/spool/mail" +#define DEFAULT_MAIL_DIRECTORY "/var/spool/mail" /* Characteristics of the system's header files and libraries that affect the compilation environment. */ diff -Naur bash-3.2.orig/config-top.h bash-3.2/config-top.h --- bash-3.2.orig/config-top.h 2005-04-29 13:36:34.000000000 -0700 +++ bash-3.2/config-top.h 2009-01-08 16:05:44.000000000 -0800 @@ -52,14 +52,14 @@ /* The default value of the PATH variable. */ #ifndef DEFAULT_PATH_VALUE #define DEFAULT_PATH_VALUE \ - "/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:." + "/usr/local/bin:/bin:/usr/bin" #endif /* The value for PATH when invoking `command -p'. This is only used when the Posix.2 confstr () function, or CS_PATH define are not present. */ #ifndef STANDARD_UTILS_PATH #define STANDARD_UTILS_PATH \ - "/bin:/usr/bin:/sbin:/usr/sbin:/etc:/usr/etc" + "/bin:/usr/bin:/usr/sbin:/sbin" #endif /* Default primary and secondary prompt strings. */ diff -Naur bash-3.2.orig/lib/readline/misc.c bash-3.2/lib/readline/misc.c --- bash-3.2.orig/lib/readline/misc.c 2009-01-08 15:56:23.000000000 -0800 +++ bash-3.2/lib/readline/misc.c 2009-01-08 16:06:59.000000000 -0800 @@ -560,7 +560,7 @@ #if defined (VI_MODE) _rl_set_insert_mode (RL_IM_INSERT, 1); /* vi mode ignores insert mode */ rl_editing_mode = vi_mode; - rl_vi_insertion_mode (1, key); + rl_vi_insert_mode (1, key); #endif /* VI_MODE */ return 0; diff -Naur bash-3.2.orig/lib/readline/readline.c bash-3.2/lib/readline/readline.c --- bash-3.2.orig/lib/readline/readline.c 2009-01-08 15:56:23.000000000 -0800 +++ bash-3.2/lib/readline/readline.c 2009-01-08 16:06:59.000000000 -0800 @@ -370,7 +370,7 @@ #if defined (VI_MODE) if (rl_editing_mode == vi_mode) - rl_vi_insertion_mode (1, 'i'); + rl_vi_insert_mode (1, 'i'); #endif /* VI_MODE */ if (rl_pre_input_hook) @@ -733,7 +733,7 @@ { /* Special case rl_do_lowercase_version (). */ if (func == rl_do_lowercase_version) - return (_rl_dispatch (_rl_to_lower (key), map)); + return (_rl_dispatch (_rl_to_lower ((unsigned char)key), map)); rl_executing_keymap = map; diff -Naur bash-3.2.orig/lib/readline/readline.h bash-3.2/lib/readline/readline.h --- bash-3.2.orig/lib/readline/readline.h 2006-08-16 12:16:59.000000000 -0700 +++ bash-3.2/lib/readline/readline.h 2009-01-08 16:06:59.000000000 -0800 @@ -230,6 +230,7 @@ extern int rl_vi_end_word PARAMS((int, int)); extern int rl_vi_insert_beg PARAMS((int, int)); extern int rl_vi_append_mode PARAMS((int, int)); +extern int rl_vi_insert_mode PARAMS((int, int)); extern int rl_vi_append_eol PARAMS((int, int)); extern int rl_vi_eof_maybe PARAMS((int, int)); extern int rl_vi_insertion_mode PARAMS((int, int)); diff -Naur bash-3.2.orig/lib/readline/vi_keymap.c bash-3.2/lib/readline/vi_keymap.c --- bash-3.2.orig/lib/readline/vi_keymap.c 2005-03-25 16:22:57.000000000 -0800 +++ bash-3.2/lib/readline/vi_keymap.c 2009-01-08 16:06:59.000000000 -0800 @@ -151,7 +151,7 @@ { ISFUNC, rl_vi_char_search }, /* f */ { ISFUNC, (rl_command_func_t *)0x0 }, /* g */ { ISFUNC, rl_backward_char }, /* h */ - { ISFUNC, rl_vi_insertion_mode }, /* i */ + { ISFUNC, rl_vi_insert_mode }, /* i */ { ISFUNC, rl_get_next_history }, /* j */ { ISFUNC, rl_get_previous_history }, /* k */ { ISFUNC, rl_forward_char }, /* l */ diff -Naur bash-3.2.orig/lib/readline/vi_mode.c bash-3.2/lib/readline/vi_mode.c --- bash-3.2.orig/lib/readline/vi_mode.c 2009-01-08 15:56:23.000000000 -0800 +++ bash-3.2/lib/readline/vi_mode.c 2009-01-08 16:06:59.000000000 -0800 @@ -220,6 +220,15 @@ if (rl_point > 0) _rl_vi_backup (); } + /* Ditto for redoing an insert with `I', but move to the beginning of line + like the `I' command does. */ + else if (_rl_vi_last_command == 'I' && vi_insert_buffer && *vi_insert_buffer) + { + rl_beg_of_line (1, 'I'); + _rl_vi_stuff_insert (count); + if (rl_point > 0) + _rl_vi_backup (); + } else r = _rl_dispatch (_rl_vi_last_command, _rl_keymap); vi_redoing = 0; @@ -584,7 +593,7 @@ int count, key; { rl_beg_of_line (1, key); - rl_vi_insertion_mode (1, key); + rl_vi_insert_mode (1, key); return (0); } @@ -618,6 +627,14 @@ } int +rl_vi_insert_mode (count, key) + int count, key; +{ + rl_vi_start_inserting (key, 1, rl_arg_sign); + return (0); +} + +int rl_vi_append_eol (count, key) int count, key; { @@ -690,7 +707,7 @@ } else { - if ((_rl_vi_last_key_before_insert == 'i' || _rl_vi_last_key_before_insert == 'a') && rl_undo_list) + if ((_rl_vi_last_key_before_insert == 'i' || _rl_vi_last_key_before_insert == 'a' || _rl_vi_last_key_before_insert == 'I') && rl_undo_list) _rl_vi_save_insert (rl_undo_list); /* XXX - Other keys probably need to be checked. */ else if (_rl_vi_last_key_before_insert == 'C') diff -Naur bash-3.2.orig/parse.y bash-3.2/parse.y --- bash-3.2.orig/parse.y 2009-01-08 15:56:51.000000000 -0800 +++ bash-3.2/parse.y 2009-01-08 16:04:59.000000000 -0800 @@ -1182,7 +1182,7 @@ #if defined (READLINE) char *current_readline_prompt = (char *)NULL; -char *current_readline_line = (char *)NULL; +unsigned char *current_readline_line = (unsigned char *)NULL; int current_readline_line_index = 0; static int diff -Naur bash-3.2.orig/shell.c bash-3.2/shell.c --- bash-3.2.orig/shell.c 2006-05-17 05:46:54.000000000 -0700 +++ bash-3.2/shell.c 2009-01-08 16:07:33.000000000 -0800 @@ -71,6 +71,10 @@ # include #endif +#if defined (READLINE) +#include "bashline.h" +#endif + #include #include @@ -1719,6 +1723,11 @@ delete_all_contexts (shell_variables); delete_all_variables (shell_functions); +#if defined (READLINE) + sv_comp_wordbreaks ("COMP_WORDBREAKS"); + bash_readline_initialized = 0; +#endif /* READLINE */ + shell_reinitialized = 1; }