--- config-top.h +++ config-top.h 2014-04-17 10:41:21.918735368 +0000 @@ -56,17 +56,21 @@ due to EPIPE. */ /* #define DONT_REPORT_BROKEN_PIPE_WRITE_ERRORS */ +#ifndef _PATH_DEFPATH +# include +#endif + /* The default value of the PATH variable. */ #ifndef DEFAULT_PATH_VALUE #define DEFAULT_PATH_VALUE \ - "/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:." + "/usr/local/bin:" _PATH_DEFPATH ":." #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" + _PATH_STDPATH #endif /* Default primary and secondary prompt strings. */ @@ -80,20 +84,20 @@ #define KSH_COMPATIBLE_SELECT /* System-wide .bashrc file for interactive shells. */ -/* #define SYS_BASHRC "/etc/bash.bashrc" */ +#define SYS_BASHRC "/etc/bash.bashrc" /* System-wide .bash_logout for login shells. */ -/* #define SYS_BASH_LOGOUT "/etc/bash.bash_logout" */ +#define SYS_BASH_LOGOUT "/etc/bash.bash_logout" /* Define this to make non-interactive shells begun with argv[0][0] == '-' run the startup files when not in posix mode. */ -/* #define NON_INTERACTIVE_LOGIN_SHELLS */ +#define NON_INTERACTIVE_LOGIN_SHELLS /* Define this if you want bash to try to check whether it's being run by sshd and source the .bashrc if so (like the rshd behavior). This checks for the presence of SSH_CLIENT or SSH2_CLIENT in the initial environment, which can be fooled under certain not-uncommon circumstances. */ -/* #define SSH_SOURCE_BASHRC */ +#define SSH_SOURCE_BASHRC /* Define if you want the case-capitalizing operators (~[~]) and the `capcase' variable attribute (declare -c). */ --- doc/Makefile.in +++ doc/Makefile.in 2006-03-27 12:15:25.000000000 +0000 @@ -146,7 +146,7 @@ BASHREF_FILES = $(srcdir)/bashref.texi $ ${RM} $@ -${DVIPS} $< -all: ps info dvi text html +all: info html nodvi: ps info text html everything: all pdf --- doc/bash.1 +++ doc/bash.1 2006-03-27 12:15:25.000000000 +0000 @@ -5080,8 +5080,8 @@ file (the \fIinputrc\fP file). The name of this file is taken from the value of the .SM .B INPUTRC -variable. If that variable is unset, the default is -.IR ~/.inputrc . +environment variable. If that variable is unset, readline will read both +.IR /etc/inputrc " and " ~/.inputrc . When a program which uses the readline library starts up, the initialization file is read, and the key bindings and variables are set. @@ -10266,6 +10266,9 @@ The individual login shell cleanup file, .TP .FN ~/.inputrc Individual \fIreadline\fP initialization file +.TP +.FN /etc/inputrc +System \fBreadline\fP initialization file .PD .SH AUTHORS Brian Fox, Free Software Foundation --- general.h +++ general.h 2006-03-27 12:15:25.000000000 +0000 @@ -21,10 +21,13 @@ #if !defined (_GENERAL_H_) #define _GENERAL_H_ +#include +#include #include "stdc.h" #include "bashtypes.h" #include "chartypes.h" +#include "bashline.h" #if defined (HAVE_SYS_RESOURCE_H) && defined (RLIMTYPE) # if defined (HAVE_SYS_TIME_H) --- parse.y +++ parse.y 2006-03-27 12:15:25.000000000 +0000 @@ -1413,7 +1413,7 @@ input_file_descriptor () #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 --- shell.c +++ shell.c 2006-03-27 12:15:25.000000000 +0000 @@ -492,7 +492,7 @@ main (argc, argv, env) if (dump_translatable_strings) read_but_dont_execute = 1; - if (running_setuid && privileged_mode == 0) + if (running_setuid && privileged_mode == 0 /* && act_like_sh == 0 */) disable_priv_mode (); /* Need to get the argument to a -c option processed in the --- support/man2html.c +++ support/man2html.c 2011-11-25 17:07:29.000000000 +0000 @@ -78,6 +78,7 @@ #include #include #include +#include #define NULL_TERMINATED(n) ((n) + 1) --- support/rlvers.sh +++ support/rlvers.sh 2006-03-27 12:15:25.000000000 +0000 @@ -27,10 +27,10 @@ TDIR=$TMPDIR/rlvers # defaults CC=cc -RL_LIBDIR=/usr/local/lib -RL_INCDIR=/usr/local/include +RL_LIBDIR=/lib +RL_INCDIR=/usr/include -TERMCAP_LIB="-ltermcap" +echo 'int main () { return 0; }' | gcc -ltinfo -o /dev/null -xc - > /dev/null 2>&1 && TERMCAP_LIB="-ltinfo" || TERMCAP_LIB="-lncurses" # cannot rely on the presence of getopts while [ $# -gt 0 ]; do --- support/shobj-conf +++ support/shobj-conf 2006-09-22 14:11:58.000000000 +0000 @@ -126,10 +126,11 @@ sunos5*|solaris2*) linux*-*|gnu*-*|k*bsd*-gnu-*|freebsd*-gentoo) SHOBJ_CFLAGS=-fPIC SHOBJ_LD='${CC}' - SHOBJ_LDFLAGS='-shared -Wl,-soname,$@' + SHOBJ_LDFLAGS='-shared' - SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir) -Wl,-soname,`basename $@ $(SHLIB_MINOR)`' + SHLIB_XLDFLAGS='-Wl,-rpath-link,$(libdir) -Wl,-soname,`basename $@ $(SHLIB_MINOR)`' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' + echo 'int main () { return 0; }' | gcc -ltinfo -o /dev/null -xc - > /dev/null 2>&1 && SHLIB_LIBS=-ltinfo || SHLIB_LIBS=-lncurses ;; freebsd2*) --- tests/run-intl +++ tests/run-intl 2009-08-26 11:13:13.000000000 +0000 @@ -5,4 +5,4 @@ echo "warning: some of these tests will echo "warning: locales installed on your system." >&2 echo "warning: please ignore any differences consisting only of white space" >&2 ${THIS_SH} ./intl.tests > /tmp/xx -diff $AFLAG /tmp/xx intl.right && rm -f /tmp/xx +diff -w $AFLAG /tmp/xx intl.right && rm -f /tmp/xx --- tests/run-read +++ tests/run-read 2009-08-26 11:13:13.000000000 +0000 @@ -1,4 +1,4 @@ echo "warning: please do not consider output differing only in the amount of" >&2 echo "warning: white space to be an error." >&2 ${THIS_SH} ./read.tests > /tmp/xx 2>&1 -diff /tmp/xx read.right && rm -f /tmp/xx +diff -w /tmp/xx read.right && rm -f /tmp/xx --- execute_cmd.c +++ execute_cmd.c 2014-04-17 11:56:03.742234753 +0000 @@ -5225,7 +5225,8 @@ shell_execve (command, args, env) run it for some reason. See why. */ #if defined (HAVE_HASH_BANG_EXEC) READ_SAMPLE_BUF (command, sample, sample_len); - sample[sample_len - 1] = '\0'; + if (sample_len > 0) + sample[sample_len - 1] = '\0'; if (sample_len > 2 && sample[0] == '#' && sample[1] == '!') { char *interp; --- support/bashbug.sh +++ support/bashbug.sh 2014-04-17 12:01:05.678235918 +0000 @@ -1,4 +1,4 @@ -#!/bin/sh - +#!/bin/bash - # # bashbug - create a bug report and mail it to the bug address # --- shell.c +++ shell.c 2014-04-17 12:19:01.758235040 +0000 @@ -42,6 +42,7 @@ #if defined (HAVE_UNISTD_H) # include # include +# include #endif #include "bashintl.h" @@ -1226,6 +1227,7 @@ uidget () void disable_priv_mode () { + setgroups(0, NULL); setuid (current_user.uid); setgid (current_user.gid); current_user.euid = current_user.uid;